Skip to content
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

Obfuscated file causes System.OutOfMemoryException #963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marci4
Copy link

@marci4 marci4 commented Dec 5, 2024

Loading an obfuscated file (obfuscated with RedGate SmartAssembly 6) results in an out of memory exception because the SizeOfData in the DebugHeader is invalid

According to https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-debug-section the field 'Characteristics' is "reserved" and "must be zero".

Therefore ignore everything else if Characteristics != 0

…results in an out of memory exception because the SizeOfData in the DebugHeader is invalid --> Ignore the DebugHeaderEntry if Characteristics != 0
@marci4
Copy link
Author

marci4 commented Dec 5, 2024

Could be a fix for #708
The behavior changed between 0.9.6.4 and 0.10 and I tracked it back to the support for debug header #349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant