Assertion failure in jas_image.c:1010
Vancir opened this issue · comments
Vancir commented
I saw there are some issues about this failure before. #345 #338
It seems version 4.0.0 have patched this error. But I can still trigger this failure on the latest code (commit 294db12)
minimized poc: min_poc.zip
Steps to reproduce
git clone https://github.com/jasper-software/jasper.git && cd jasper
mkdir static_build && cd static_build
cmake -DJAS_ENABLE_SHARED=false -DJAS_ENABLE_DOC=false ..
make -j4
# ----------------------------
➜ demo git:(main) ✗ ./jasper/static_build/src/app/jasper -f min_poc -F test.jp2 -T jp2
jasper: /data/demo/jasper/src/libjasper/base/jas_image.c:1010: inttobits: Assertion `v >= 0 || sgnd' failed.
[1] 2498970 abort ./jasper/static_build/src/app/jasper -f min_poc -F test.jp2 -T jp2
Michael Adams commented
This problem is fixed now on the master branch. There was an integer overflow occurring in the processing of the PNM data.