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

Check for possible overflow when checking for segment overlap. #1087

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

HoundThe
Copy link
Member

@HoundThe HoundThe commented Jul 14, 2022

Image loader computes the end of the segment, which can overflow 64bit unsigned integer due to the large image base used. I've used simple detection that relies on segment size being limited to 32bit value, and if unsigned overflow happens, it wraps around, and large 64bit + max 32bit overflowing will still be smaller than the large 64bit. If overflow is detected, I've clipped the end to the upper bound of the 64bit unsigned integer.

@PeterMatula PeterMatula merged commit 457a308 into master Jul 19, 2022
@PeterMatula PeterMatula deleted the range-fix branch July 19, 2022 13:45
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

2 participants