-
Notifications
You must be signed in to change notification settings - Fork 457
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
More overflow related bug fixes #1402
Conversation
…press, opj_dump. See comment on commit 79c7d7a.
Removed automatically generated settings.json
This reverts commit e74ee84.
…d for conformity, relocated check for num images for exicution before allocation and image loading
This reverts commit dbe64d6.
… unsigned for conformity, relocated check for num images for exicution before allocation and image loading" This reverts commit ab6c7c7.
Added overflow protection in get_num_images function, redefined num_images to unsigned int in compress and decompress to match dump
…t exicution of allocation and strcpy if there are no images.
…lue for get_num_images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from I to J was because the type of I is UINT_16, type of max is UINT_32. j is defined as UINT_32
ok, I don't think there was any issue in practice because the maximum number of components in a JPEG2000 file is 16384 and this is normally checked before |
If that check is always done, I agree that the change is not necessary. I made the edit because that check is not in the function with the iterator in the loop in question, and I did not do the leg work to ensure the check is present before every call to this function. Also this is the only loop in that section of code with the type mismatch between the iterator and comparator. |
Ran through the open security issues identified by LGTM code analysis and added fixes for the relevant issues.