-
-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PE from scratch seems to have section headers shifted #733
Comments
I figured out why the tool doesn't properly show the sections, in the file header SizeOfOptionalHeader seems to be wrong, its set to 00E8 but should be 00F0 |
Further investigation seems that details::DEFAULT_NUMBER_DATA_DIRECTORIES is 15 but it should be 16, there are 16 data directories in the PE and it also does add 16 in total so thats why the computation is off. |
Fix #733: Use correct count for data directories (PE)
@ZehMatt Did you find the way how to handle it ? |
The bug should be fixed, see #734 |
Describe the bug
Building a PE from scratch like the Python example seems to have some issue with the output, it seems that the section headers are slightly shifted by a few bytes, I had a brief look at it but I couldn't spot the issue so far.
Virtual size holds 4 bytes of the name, raw address is virtual address and so on.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Maybe I'm not using the API correctly but the headers should be at the correct position, I'm also building this using x64 if that's relevant.
Environment (please complete the following information):
Additional context
Produced output file
test.zip
The text was updated successfully, but these errors were encountered: