diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2023-09-23 11:02:54 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2023-09-23 12:50:57 +0200 |
| commit | d23e0284c9be174cc6daaa594c1139076771e16b (patch) | |
| tree | d442dd10e7a11500b68d5ac11f43c5969856ce9b /wrapping/java/openjp2/java-sources/org/openJpeg/OpenJPEGJavaDecoder.java | |
| parent | 1ee6d115e80036d1d38bad7f95a680bfc612c1bf (diff) | |
fix: use `opj_uint_ceildiv` instead of `opj_int_ceildiv` when necessary
There are a bunch of loc where we can see a usage of `opj_int_ceildiv`:
```
(OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)a, (OPJ_INT32)b);
```
where a & b are `OPJ_UINT32`.
This can lead to overflow/underflow for some a/b combinations.
Replace those calls by `opj_uint_ceildiv` instead to always get a correct result.
This also allows some valid single tile images with huge tile size to be decoded properly.
Fix #1438
Diffstat (limited to 'wrapping/java/openjp2/java-sources/org/openJpeg/OpenJPEGJavaDecoder.java')
0 files changed, 0 insertions, 0 deletions
