Accept populated COFF symbol headers #410
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some binaries (not sure what toolchain has generated them) may have pointers to COFF symbols that point to nothing.
Since COFF symbols tables are deprecated anyway, it could be better to ignore these symbols than returning an
Err
that will prevent the whole PE file from parsing.I know you're not always happy to remove error conditions for the sake of parsing more binaries, so I'd like to have your opinion on such a "fix" :-)
Example of such binaries: git for Windows (at least some builds).
PortableGit\cmd\git.exe
has populatedpointer_to_symbol_table
andnumber_of_symbols
that point after the end of file. Hence, it cannot be parsed byobject
because of "Invalid COFF symbol table offset or size"