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 casts in readUInt shifts #1172

Merged

Conversation

peterhillman
Copy link
Contributor

Address https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39579
Change order of casts to prevent automatic cast to signed integer, which reports as undefined behavior if value overflows INT_MAX

Signed-off-by: Peter Hillman peterh@wetafx.co.nz

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Copy link
Contributor

@kdt3rd kdt3rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was debating whether to suggest the xdr uint32_t to native routine, but this continues to avoid any unaligned access which may cause an issue on some hardware

@kdt3rd kdt3rd merged commit e86910c into AcademySoftwareFoundation:master Oct 5, 2021
@peterhillman peterhillman deleted the core_huf_readu_fix branch October 5, 2021 20:03
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Oct 14, 2021
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
cary-ilm pushed a commit that referenced this pull request Oct 24, 2021
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants