Bug 648887

Summary: exiftran crashes while rotating JPEG image
Product: [openSUSE] openSUSE 11.3 Reporter: Axel Schwank <axel>
Component: OtherAssignee: Petr Uzel <puzel>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Axel Schwank 2010-10-24 20:27:42 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.14) Gecko/20101013 SUSE/2.0.9-2.1 SeaMonkey/2.0.9

I tried to roate a JEPG image with
exiftran -9 -i -p image.jpeg
which causes a segmentation fault.

Reproducible: Always

Steps to Reproduce:
1. Try to rotate an image with exiftran -9 -i -p file.jepg
I think any JPEG image would do, if not, I can provide a sample image which caused the crash.
Actual Results:  
Segmantation fault. For analysis I compiled exiftran from source, which yields the same result as using the installed version.
Some GDB output:

Core was generated by `/home/schwank/Dokumente/Ablage/Pakete/fbida-2.07/exiftran -9 -i -p IMGA0003.jpeg'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000405ba4 in transpose_critical_parameters (dstinfo=0x7fffdb834a00) at jpeg/transupp.c:656
656         itemp = compptr->h_samp_factor;
(gdb) p compptr
$1 = (jpeg_component_info *) 0x300000008
(gdb) p compptr->h_samp_factor
Cannot access memory at address 0x300000010
(gdb) p *compptr
Cannot access memory at address 0x300000008
(gdb) p dstinfo->comp_info
$2 = (jpeg_component_info *) 0x300000008
(gdb) bt
#0  0x0000000000405ba4 in transpose_critical_parameters (dstinfo=0x7fffdb834a00) at jpeg/transupp.c:656
#1  0x0000000000405f13 in jtransform_adjust_parameters (srcinfo=0x7fffdb834770, dstinfo=0x7fffdb834a00, src_coef_arrays=0x61da08, info=0x7fffdb834700)
    at jpeg/transupp.c:785
#2  0x000000000040397f in do_transform (src=0x7fffdb834770, dst=0x7fffdb834a00, transform=JXFORM_ROT_90, comment=0x0, thumbnail=0x0, tsize=0, flags=1)
    at jpegtools.c:442
#3  0x000000000040341e in do_thumbnail (ed=0x617720, transform=JXFORM_ROT_90) at jpegtools.c:297
#4  0x000000000040367e in do_exif (src=0x7fffdb835370, transform=0x7fffdb834e5c, thumbnail=0x0, tsize=0, flags=547) at jpegtools.c:362
#5  0x00000000004038c0 in do_transform (src=0x7fffdb835370, dst=0x7fffdb835120, transform=JXFORM_ROT_90, comment=0x0, thumbnail=0x0, tsize=0, flags=547)
    at jpegtools.c:423
#6  0x0000000000403b1a in jpeg_transform_fp (in=0x60d010, out=0x60d270, transform=JXFORM_ROT_90, comment=0x0, thumbnail=0x0, tsize=0, flags=547)
    at jpegtools.c:491
#7  0x0000000000403f85 in jpeg_transform_inplace (file=0x7fffdb836284 "IMGA0003.jpeg", transform=JXFORM_ROT_90, comment=0x0, thumbnail=0x0, tsize=0, 
    flags=547) at jpegtools.c:588
#8  0x0000000000402640 in main (argc=5, argv=0x7fffdb8358a8) at exiftran.c:263


Expected Results:  
The image sould have been rotated.

It could be a compatibility issue of libjpeg.
openSuSE 11.3 only comes with libjpeg-devel from libjpeg8, so exiftran is probably built with that version.
But fbida has an own copy of jpeglib.h from version 6.2 which might cause trouble.
Just a guess.
Comment 1 Petr Uzel 2010-11-11 10:28:27 UTC
Duplicate. [Sorry, I have not had time to look into it yet.]

*** This bug has been marked as a duplicate of bug 648885 ***