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: Prevent buffer overflow in read_bytes function #13

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

jorgeaduran
Copy link
Contributor

  • Adjust end_of_string to buffer_end if it exceeds buffer_end
  • Ensure rva does not exceed buffer size before slicing

- Adjust end_of_string to buffer_end if it exceeds buffer_end
- Ensure rva does not exceed buffer size before slicing
- Comment out debug prints to avoid cluttering logs
@marirs
Copy link
Owner

marirs commented Jul 2, 2024

Hi - Thanks for this PR.
Did you once test with all files to see if you are getting results?
Last time I had to revert this because it had some issues with certain files not giving output.

@jorgeaduran
Copy link
Contributor Author

Hi! These changes were made because I encountered errors with these three files:

•	1A9FD80174AAFECD9A52FD908CB82637
•	0775A35E939A14A382B562C95845CB50
•	7FAAFC7E4A5C736EBFEE6ABBBC812D80

I tested several files and did not observe any issues with detection. However, I can create a more comprehensive set of samples to conduct more exhaustive testing if needed.

@marirs marirs merged commit dbd4556 into marirs:master Jul 2, 2024
4 checks passed
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.

2 participants