avast / avast/retdec

If file path contains "-" will yield invalid architecture

Open
#1,071 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

As said in the title if the file path contains "-", for example:

./examples/Miller–Rabin_prime_test/Miller_Rabin_prime_test

It will yield the following error.

Invalid encoding in string. @ line = 4, column = 65
Error: Unsupported target format 'INVALID ENCODING IN STRING. @ LINE = 4, COLUMN = 65Invalid encoding in string. @ line = 4, column = 65'. Supported formats: ELF32, ELF64, PE32, Intel HEX 32, Mach-O 32.

when running with the retdec-decompiler.py

However once changing the file path to ./examples/Miller_Rabin_prime_test/Miller_Rabin_prime_test. It will decompile the software correctly.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with retdec-decompiler.py using ./examples/Miller–Rabin_prime_test/Miller_Rabin_prime_test, then inspect how that entry point handles paths containing '-'. Compare it with the renamed Miller_Rabin_prime_test path; done means the original path decompiles without the invalid-encoding and unsupported-target-format errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
compilers, reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.