Ghostscript crashes with a GPF. Tested on different Windows systems on different machines. To reproduce this behaviour do this (on a WinXP-SP2): 1.) Open paint. 2.) Go to image/setting and choose for colors black/white. 3.) Print it with the adobe postscript printer driver in a postscript file. 4.) Convert this postscript file to a pdf file with this parameter file. -IC:\GS8.53\gs8.53\Lib\;C:\Gs8.53\Fonts\;C:\GS8.53\gs8.53\Resource\ -q -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -r600x600 -dConvertCMYKImagesToRGB=true -sOutputFile=crash.pdf -f test.ps 5.) AFPL Ghostscript 8.51, 8.52, 8.53 crashes. The problem is the parameter -dConvertCMYKImagesToRGB=true This doesn't happen with AFPL Ghostscript 8.50 or GPL Ghostscript 8.15. Test files (postscript file and parameter file) are available. Send me an email if this is necessary. Best regards, Frank
Created attachment 1784 [details] Test files to reproduce the described behaviour With these files you can reproduce the described behaviour.
Created attachment 1795 [details] patch Fix a SEGV in ps2pdf conversion of imagemask with -dConvertCMYKImagesToRGB=true flag introduced in v.1.62 with the simplified logic.
Leonardo, please take a look at the proposed fix.
Alex, The patch is good, please commit and close the bug.
The patch is committed.