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

Fix catch-all exception clause in parse_resources_directory #175

Merged
merged 3 commits into from Mar 19, 2022
Merged

Fix catch-all exception clause in parse_resources_directory #175

merged 3 commits into from Mar 19, 2022

Conversation

tdube
Copy link
Contributor

@tdube tdube commented Apr 3, 2017

This particular call to PE.get_data() was not in a try-catch block and caused an uncaught PEFormatError exception when parsing malware sample 4cf7e36c5ef5b37f3231740794fecdaec5635b176320288a50694ca5be7ac898 (32-bit PE). PE.get_data() attempts to read from RVA 0xffe93eb8 which is invalid.

This particular call to PE.get_data() was not in a try-catch block and caused an uncaught PEFormatError exception when parsing malware sample 4cf7e36c5ef5b37f3231740794fecdaec5635b176320288a50694ca5be7ac898 (32-bit PE). PE.get_data() attempts to read from RVA 0xffe93eb8 which is invalid.
@bernhl
Copy link
Contributor

bernhl commented Aug 3, 2017

I can verify both the issue and that it works fine with the patch.

@tdube
Copy link
Contributor Author

tdube commented Jan 5, 2018

PR #166 already addressed most of this PR, but includes a catch-all exception clause. This PR now limits the exception to PEFormatError.

@tdube tdube changed the title Added try-catch block for call to PE.get_data() Fix catch-all exception clause in parse_resources_directory(). Jan 5, 2018
@tdube tdube changed the title Fix catch-all exception clause in parse_resources_directory(). Fix catch-all exception clause in parse_resources_directory Jan 5, 2018
@erocarrera erocarrera merged commit 4911c83 into erocarrera:master Mar 19, 2022
@tdube tdube deleted the patch-1 branch March 20, 2022 01:17
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.

None yet

3 participants