-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation faults when using MagickQuantizeImages with sRGBColorspace #77
Comments
We tried your use case with ImageMagick 6.9.11-1, under CentOS 7.7.1908 and it completed without complaint. The code snippet is
If 6.9.11-1 still fails for you, post a small program here so we can download and reproduce the problem. A stack trace with line numbers would be helpful as well. |
Hi. here is an example code to reproduce the problem. If you use MagickReadImageBlob, it works. .```
|
Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow. |
Thanks. it works :) |
Hi.
I'm aiming to use MagickQuantizeImages function on a gif image with sRGBColorspace.
Normally, it works, but some images generate segmentation faults.
Below is a sample code snippet of how I use MagickQuzntizeImages function, and a stack trace extracted from the core dump.
code sinppet
`
int colorspace_type;
`
Stack trace
#0 0x00007f1839389633 in _int_malloc () at /lib64/libc.so.6
#1 0x00007f183938a3a6 in _int_memalign () at /lib64/libc.so.6
#2 0x00007f183938d3c5 in memalign () at /lib64/libc.so.6
#3 0x00007f183938f04c in posix_memalign () at /lib64/libc.so.6
#4 0x00000000005b3522 in AcquireAlignedMemory ()
#5 0x00000000005838c4 in OpenPixelCache ()
#6 0x000000000047aad2 in GetImagePixelCache ()
#7 0x000000000058630b in SyncImagePixelCache ()
#8 0x000000000077b1c2 in AssignImageColors ()
#9 0x000000000077df2f in QuantizeImages ()
#10 0x00000000007d5944 in MagickQuantizeImages ()
It seems the memory overflow bug, but I'm not sure.
I attach the error image.
(NOTE) I used an Imagemagick (ImageMagick6-6.9.10-92)
(NOTE) In Mac, the bug doesn't happen. The bug happens at "CentOS Linux release 7.6.1810" with kernel "3.10.0-1062.1.2.el7.x86_64"
The text was updated successfully, but these errors were encountered: