Created attachment 486087 [details] Broken jpeg considered as valid by libjpeg-turbo Description of problem: Some broken jpeg are considered as valid by libjpeg-turbo. The bug has been introduced when libjpeg has been replaced by libjpeg-turbo (Fedora 14 release). Some software relies on error detection like the forensics tool photorec (testdisk package). Version-Release number of selected component (if applicable): libjpeg-turbo-1.0.1-1.fc14.1.x86_64 How reproducible: Always Steps to Reproduce: 1. gcc -W -Wall -o check_jpg check_jpg.c -ljpeg 2. ./check_jpeg broken.jpg Actual results: Start of Image Miscellaneous marker 0xe1, length 7164 Define Quantization Table 0 precision 0 Define Quantization Table 1 precision 0 Start Of Frame 0xc0: width=2272, height=1704, components=3 Component 1: 2hx1v q=0 Component 2: 1hx1v q=1 Component 3: 1hx1v q=1 Define Huffman Table 0x00 Define Huffman Table 0x10 Define Huffman Table 0x01 Define Huffman Table 0x11 Start Of Scan: 3 components Component 1: dc=0 ac=0 Component 2: dc=1 ac=1 Component 3: dc=1 ac=1 Ss=0, Se=63, Ah=0, Al=0 End Of Image broken.jpg OK Expected results: Start of Image Miscellaneous marker 0xe1, length 7164 Define Quantization Table 0 precision 0 Define Quantization Table 1 precision 0 Start Of Frame 0xc0: width=2272, height=1704, components=3 Component 1: 2hx1v q=0 Component 2: 1hx1v q=1 Component 3: 1hx1v q=1 Define Huffman Table 0x00 Define Huffman Table 0x10 Define Huffman Table 0x01 Define Huffman Table 0x11 Start Of Scan: 3 components Component 1: dc=0 ac=0 Component 2: dc=1 ac=1 Component 3: dc=1 ac=1 Ss=0, Se=63, Ah=0, Al=0 Corrupt JPEG data: premature end of data segment End Of Image broken.jpg BAD "display broken.jpg" (ImageMagick package) only show an error "display: Corrupt JPEG data: premature end of data segment `broken.jpg' @ warning/jpeg.c/EmitMessage/230." when used with libjpeg instead of libjpeg-turbo Additional info: I have used /usr/lib64/libjpeg.so.62.0.0 from CentOS 5.5 libjpeg to generate the expected results.
Created attachment 486088 [details] Little C program to check the jpeg file validity
Problem has been reproduced with libjpeg-turbo-1.1.0 Bug has been opened upstream https://sourceforge.net/tracker/?func=detail&aid=3220774&group_id=303195&atid=1278158
libjpeg-turbo-1.1.0-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/libjpeg-turbo-1.1.0-2.fc14
libjpeg-turbo-1.1.0-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/libjpeg-turbo-1.1.0-2.fc15
libjpeg-turbo-1.1.0-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
libjpeg-turbo-1.1.0-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.