lt-convert - IM6 SVN - a60cbea7

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
JodieC
Posts: 82
Joined: 2014-10-03T21:38:50-07:00
Authentication code: 6789

lt-convert - IM6 SVN - a60cbea7

Post 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/ )
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: lt-convert - IM6 SVN - a60cbea7

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: lt-convert - IM6 SVN - a60cbea7

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
JodieC
Posts: 82
Joined: 2014-10-03T21:38:50-07:00
Authentication code: 6789

Re: lt-convert - IM6 SVN - a60cbea7

Post by JodieC »

Dies better after the patch, thanks!
Post Reply