Closed yangfar closed 1 year ago
What makes you think this is issue with jpegoptim? Stack trace clearly shows it was (code in) libjpeg.so that seems to have made out-of-bounds read....
This should not be the problem of jpegoptim, but how to avoid these crashes when libjpeg. so is called.
Finally got around to look into this further. AddressSanitizer was 'hiding' what was happening, when compiled withouth it NULL pointer dereference was apparent.
Bug was indeed in jpegoptim, this change should fix this: 3401f250ace692a5b23eac1617dc429eb3566f9f
With the help of AFL, I found some crashes. Are they new bugs?
================================================================= ==3914==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f92addb01f7 bp 0x7ffce101b640 sp 0x7ffce101a2e0 T0) ==3914==The signal is caused by a READ memory access. ==3914==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used.
0 0x7f92addb01f7 (/lib/x86_64-linux-gnu/libjpeg.so.8+0x201f7)
AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libjpeg.so.8+0x201f7) ==3914==ABORTING