fix(pe): skip indirect section names for PE images#532
Open
leno23 wants to merge 2 commits into
Open
Conversation
Indirect `/offset` section names are a COFF object-file feature. PE images store UTF-8 names in the 8-byte section name field, so treat leading slashes literally unless parsing a COFF object. Fixes m4b#487 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Thanks for the PR! Relevant issue: #487 I think we need some discussion whether we really need this? I like this, but don't know if we should go this direction. |
Contributor
Author
|
Resolved the merge conflict with upstream master in commit db586c8 and applied rustfmt to the PE COFF section parsing line. During the merge, upstream added Local verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
parse_indirect_section_namestoParseOptions(default:falsefor PE)/offsetand//base64COFF section name references when parsing COFF object filesCoff::parseviaParseOptions::coff()Fixes #487
Test plan
cargo test --lib pe::section_table::testscargo test --lib string_table_excludes_length/1234567names and COFF indirect parsing