Package: libgraphicsmagick1
Version: 1.1.7-13
Severity: important
Hi,
I was wondering what "gm identify" would do on a canon raw (.cr2) image.
The effect I get is:
gm[19264]: segfault at 0000000000000004 rip 00002b30b10df5b0 rsp
00007ffffa18f668 error 4
Segmentation fault (core dumped)
(Note that the first message is from the kernel.)
Core was generated by `gm identify img_0453.cr2'.
Program terminated with signal 11, Segmentation fault.
#0 0x00002b30b10df5b0 in strlen () from /lib/libc.so.6
(gdb) bt
#0 0x00002b30b10df5b0 in strlen () from /lib/libc.so.6
#1 0x00002b30b10b14bc in vfprintf () from /lib/libc.so.6
#2 0x00002b30b10d172a in vsnprintf () from /lib/libc.so.6
#3 0x00002b30b0bde495 in TIFFErrors (module=0x2b30b0f482a0 "MissingRequired",
format=0x2b30b0f47b10 "%s: TIFF directory is missing required \"%s\"
field", warning=0x7ffffa1906b0) at tiff.c:374
#4 0x00002b30b0f266c2 in TIFFErrorExt () from /usr/lib/libtiff.so.4
#5 0x00002b30b0f23523 in TIFFReadDirectory () from /usr/lib/libtiff.so.4
#6 0x00002b30b0bdf553 in ReadTIFFImage (image_info=0x5154c0,
exception=0x7ffffa193d10) at tiff.c:1394
#7 0x00002b30b0aca300 in ReadImage (image_info=<value optimized out>,
exception=0x7ffffa193d10) at constitute.c:2748
#8 0x00002b30b0b3161d in ReadStream (image_info=<value optimized out>,
stream=0x2b30b0ac5d70 <PingStream>, exception=0x7ffffa193d10)
at stream.c:488
#9 0x00002b30b0ac911a in PingImage (image_info=<value optimized out>,
exception=0x7ffffa193d10) at constitute.c:1060
#10 0x00002b30b0a9c0b4 in IdentifyImageCommand (image_info=0x509fc0, argc=2,
argv=0x50c110, metadata=0x7ffffa193d58, exception=0x7ffffa193d10)
at command.c:6791
#11 0x00002b30b0a9b1b2 in MagickCommand (image_info=0x509fc0, argc=2,
argv=0x7ffffa193e60, metadata=0x7ffffa193d58, exception=0x7ffffa193d10)
at command.c:7210
#12 0x0000000000400e65 in main (argc=2, argv=0x7ffffa193e60) at gm.c:150
(gdb)
Note that a .cr2 image looks alot like a tiff image.
Anyway, the code is doing:
(void) vsprintf(message,format,warning);
(void) vsnprintf(message,MaxTextExtent-2,format,warning);
where warning is a va_list.
First I have to wonder why it's writing to message twice. It probably
should only have the second line.
Anyway, this is not portable. You're using warning, which is a va_list,
twice. If you want to do that, you need to use va_copy(). As you can
see this break on amd64. On i386 this actually produces:
img_0453.cr2 TIFF 1936x1288+0+0 DirectClass 8-bit 8.1m 0.020u 0:01
gm identify: img_0453.cr2: TIFF directory is missing required "ImageLength"
field. (MissingRequired).
But like I said before, you probably just want to remove the first line.
Kurt
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]