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

Integer-overflow · opj_t1_encode_cblk #1432

Closed
dlemstra opened this issue Jun 28, 2022 · 0 comments
Closed

Integer-overflow · opj_t1_encode_cblk #1432

dlemstra opened this issue Jun 28, 2022 · 0 comments

Comments

@dlemstra
Copy link

The https://github.com/ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue on this line:

max = opj_int_max(max, -tmp);

With the following error message:

runtime error: negation of -2147483648 cannot be represented in type 'OPJ_INT32' (aka 'int'); cast to an unsigned type to negate this value to itself

rouault added a commit that referenced this issue Jun 30, 2022
opj_t1_encode_cblk(): avoid undefined behaviour on fuzzed input (fixes #1432)
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

No branches or pull requests

1 participant