Bug 688390

Summary: Crashes with a GPF using the parameter "-dConvertCMYKImagesToRGB=true"
Product: Ghostscript Reporter: Frank Heindörfer <software>
Component: PDF WriterAssignee: leonardo <leonardo>
Status: NOTIFIED FIXED    
Severity: critical CC: alex, leonardo
Priority: P3    
Version: 8.53   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---
Attachments: Test files to reproduce the described behaviour
patch

Description Frank Heindörfer 2005-11-18 04:52:40 UTC
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
Comment 1 Frank Heindörfer 2005-11-18 04:56:42 UTC
Created attachment 1784 [details]
Test files to reproduce the described behaviour

With these files you can reproduce the described behaviour.
Comment 2 Alex Cherepanov 2005-11-22 19:51:05 UTC
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.
Comment 3 Alex Cherepanov 2005-11-22 19:55:37 UTC
Leonardo, please take a look at the proposed fix.
Comment 4 leonardo 2005-11-25 03:44:33 UTC
Alex,

The patch is good, please commit and close the bug.
Comment 5 Alex Cherepanov 2005-11-25 07:03:45 UTC
The patch is committed.