thorfdbg / libjpeg

A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
327 stars 81 forks source link

Abort in BitStream<false>::Get #85

Closed SEU-SSL closed 1 year ago

SEU-SSL commented 1 year ago

Here is the command and stack trace:

./jpeg poc3 /dev/null

#0  0x00007fb28722000b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fb2871ff859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fb2871ff729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fb287210fd6 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00000000004f29c0 in BitStream<false>::Get (this=0x204e9b0, bits=29 '\035')
    at ../io/bitstream.hpp:172
#5  0x0000000000457cc1 in SequentialScan::DecodeBlock (this=0x204e940, block=0x2053f30, dc=0x204eb50, 
    ac=0x204fd80, prevdc=@0x204e994: 0, skip=@0x204e9a4: 0) at sequentialscan.cpp:755
#6  0x00000000004517c9 in SequentialScan::ParseMCU (this=0x204e940) at sequentialscan.cpp:414
#7  0x000000000048c4ed in Scan::ParseMCU (this=0x204e8a0) at scan.cpp:1046
#8  0x000000000042cfbb in JPEG::ReadInternal (this=0x204b4b8, tags=0x7ffddd93ea10) at jpeg.cpp:345
#9  0x000000000042c0a6 in JPEG::Read (this=0x204b4b8, tags=0x7ffddd93ea10) at jpeg.cpp:210
#10 0x000000000041a0cb in Reconstruct (infile=0x7ffddd93f942 "poc3", outfile=0x7ffddd93f947 "/dev/null", 
    colortrafo=1, alpha=0x0, upsample=true) at reconstruct.cpp:121
#11 0x0000000000406eaa in main (argc=3, argv=0x7ffddd93f218) at main.cpp:747

poc3.zip