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.
Get this backtrace
#0 0x00007ffff7067107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff70684e8 in __GI_abort () at abort.c:89
#2 0x00007ffff70a5044 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff7197c60 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff70aa81e in malloc_printerr (action=1, str=0x7ffff7193e22 "realloc(): invalid next size", ptr=<optimized out>) at malloc.c:4996
#4 0x00007ffff70ad5fb in _int_realloc (av=av@entry=0x7ffff73d5620 <main_arena>, oldp=oldp@entry=0x6252c0, oldsize=oldsize@entry=4112, nb=nb@entry=4112) at malloc.c:4234
#5 0x00007ffff70ae5f9 in __GI___libc_realloc (oldmem=0x6252d0, bytes=4096) at malloc.c:3029
#6 0x00007ffff7a4ead3 in ResizeMagickMemory (memory=0x6252d0, size=<optimized out>) at ../../magick/memory.c:1140
#7 0x00007ffff7a4eb2c in ResizeQuantumMemory (memory=<optimized out>, count=<optimized out>, quantum=<optimized out>) at ../../magick/memory.c:1205
#8 0x00007ffff3c221ef in PNMComment (image=image@entry=0x61fc80) at ../../coders/pnm.c:165
#9 0x00007ffff3c222a1 in PNMInteger (image=0x61fc80, base=10) at ../../coders/pnm.c:201
#10 0x00007ffff3c22410 in ReadPNMImage (image_info=0x44b8, exception=0x44b8) at ../../coders/pnm.c:290
#11 0x00007ffff79a89c8 in ReadImage (image_info=0x609250, exception=0x44b8, exception@entry=0x604e10) at ../../magick/constitute.c:547
#12 0x00007ffff79a9a6b in ReadImages (image_info=0x609250, exception=0x604e10) at ../../magick/constitute.c:853
#13 0x00007ffff7639e11 in ConvertImageCommand (image_info=0x2, argc=3, argv=0x603010, metadata=0xffffffffffffffff, exception=0x3064323532363030) at ../../wand/convert.c:622
#14 0x00007ffff76a5ee7 in MagickCommandGenesis (image_info=image_info@entry=0x604f90, command=0x400810 <ConvertImageCommand@plt>, argc=argc@entry=3, argv=argv@entry=0x7fffffffe108,
metadata=metadata@entry=0x0, exception=exception@entry=0x604e10) at ../../wand/mogrify.c:168
#15 0x0000000000400887 in ConvertMain (argv=0x7fffffffe108, argc=3) at ../../utilities/convert.c:81
#16 main (argc=3, argv=0x7fffffffe108) at ../../utilities/convert.c:92
D:\Images\Fuzz>convert 3677a9ec 3677a9ec.png
convert.exe: Negative or zero image size `3677a9ec' @ error/pnm.c/ReadPNMImage/417.
convert.exe: no images defined `3677a9ec.png' @ error/convert.c/ConvertImageCommand/3210.