Page 1 of 1

lt-convert - IM6 SVN - a60cbea7

Posted: 2014-12-28T21:52:45-07:00
by JodieC
Source file: https://www.dropbox.com/s/d99loi4gz2w1q3j/a60cbea7?dl=0

Reproduce:

Code: Select all

convert a60cbea7 png:/dev/null
This one just kind of runs forever...

I ctrl+c'ed it and dumped a BT:

Code: Select all

(gdb) bt
#0  0x00007ffff78ad20f in GetImageIndexInList (images=<optimized out>, images@entry=0x42787150) at magick/list.c:654
#1  0x00007ffff77ddbae in OpenPixelCache (image=image@entry=0x42787150, mode=mode@entry=IOMode, exception=exception@entry=0x4278a3c8)
    at magick/cache.c:3505
#2  0x00007ffff77c3322 in GetImagePixelCache (image=image@entry=0x42787150, clone=clone@entry=MagickTrue, exception=exception@entry=0x4278a3c8)
    at magick/cache.c:1551
#3  0x00007ffff77e16bb in SyncImagePixelCache (image=image@entry=0x42787150, exception=exception@entry=0x4278a3c8) at magick/cache.c:5127
#4  0x00007ffff78a45a1 in SetImageExtent (image=image@entry=0x42787150, columns=<optimized out>, rows=<optimized out>) at magick/image.c:2456
#5  0x00007ffff798fdc2 in ReadDDSImage (image_info=0x60e050, exception=0x604990) at coders/dds.c:1858
#6  0x00007ffff780d8b8 in ReadImage (image_info=image_info@entry=0x608ea0, exception=exception@entry=0x604990) at magick/constitute.c:547
#7  0x00007ffff780e953 in ReadImages (image_info=image_info@entry=0x608ea0, exception=exception@entry=0x604990) at magick/constitute.c:853
#8  0x00007ffff7477948 in ConvertImageCommand (image_info=0x608ea0, argc=3, argv=0x603490, metadata=0x0, exception=0x604990) at wand/convert.c:622
#9  0x00007ffff74e5a98 in MagickCommandGenesis (image_info=image_info@entry=0x604b10, command=0x400880 <ConvertImageCommand@plt>, argc=argc@entry=3, 
    argv=argv@entry=0x7fffffffddf8, metadata=metadata@entry=0x0, exception=exception@entry=0x604990) at wand/mogrify.c:168
#10 0x0000000000400907 in ConvertMain (argv=0x7fffffffddf8, argc=3) at utilities/convert.c:81
#11 main (argc=3, argv=0x7fffffffddf8) at utilities/convert.c:92

System Details:
AMD64
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

ImageMagick 6 compiled from SVN checkout 20141227.

Found with American Fuzzy Lop ( http://lcamtuf.coredump.cx/afl/ )

Re: lt-convert - IM6 SVN - a60cbea7

Posted: 2014-12-29T07:41:15-07:00
by magick
Use resource limits:
  • convert -limit memory 50MB -limit map 50MB -limit disk 50MB a60cbea7 null:
    convert: cache resources exhausted `a60cbea7' @ error/cache.c/OpenPixelCache/3642.
    convert: no images defined `null:' @ error/convert.c/ConvertImageCommand/3210.

Re: lt-convert - IM6 SVN - a60cbea7

Posted: 2014-12-29T14:01:31-07:00
by dlemstra
I added a patch for this and the processing of the image will stop a bit earlier:

Code: Select all

D:\Images\Fuzz>convert a60cbea7 null:
convert.exe: Unexpected end-of-file 'a60cbea7': No such file or directory @ erro
r/dds.c/SkipRGBMipmaps/2422.

Re: lt-convert - IM6 SVN - a60cbea7

Posted: 2015-01-01T06:28:21-07:00
by JodieC
Dies better after the patch, thanks!