-
Notifications
You must be signed in to change notification settings - Fork 455
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: use opj_uint_ceildiv
instead of opj_int_ceildiv
when necessary
#1482
Conversation
can you git commit --amend & git push -f to force CI to restart now that uclouvain/openjpeg-data#24 has been merged ? |
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 uclouvain#1438
6b0d074
to
d23e028
Compare
I'm seeing the same tests failures for "regular" on master in my fork: https://github.com/mayeut/openjpeg/actions/runs/6278478237/job/17052321449 Not sure how to go forward. |
maybe try renaming the existing tools/travis-ci/knownfailures-Ubuntu22.04-gcc11.3.0-x86_64-Release-3rdP.txt file as tools/travis-ci/knownfailures-Ubuntu22.04-gcc11.4.0-x86_64-Release-3rdP.txt since there's appear to have been an upgrade from gcc 11.3 to 11.4 |
Why do I need to use OPJ_HAVE_INTTYPES_H for GCC Windows?
|
with #1450 (which goes with "Remove support for non-C99 compilers (like VS2010) that don't support snprintf()"), support for MSVC versions prior to vs2015 is dropped (https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010). This means that all supported MSVC versions do have I can either add a definition for I'd rather go with the second option. Any thoughts ? |
ah yes, but @Jamaika1 how come inttypes.h isn't detected on your gcc windows ? Are you using an antiquated version ? |
@Jamaika1, were you defining |
I'm amateur who decided to manually assemble ffmpeg in gcc. There are lot of additions and bugs.
|
inttypes.h is a standard headers that all C99 and C++11 compatible compilers (including mingw64) should provide |
There are a bunch of loc where we can see a usage of
opj_int_ceildiv
: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
Requires data from uclouvain/openjpeg-data#24