~naesten/gs-gpl/trunk-gs

  • Committer: ken
  • Date: 2011-04-12 15:19:15 UTC
  • Revision ID: svn-v4:a1074d23-0009-0410-80fe-cf8c14f379e6:trunk/gs:12389
Fix PostScript colour handling

Bug #692116 "gs crash while executing stop operator"

The problem was caused by a mismatch between the graphics library and the PostScript
interpreter. When executing setcachedevice the graphcis library can set the colour
space to DeviceGray. Because it is unaware of the 'higher level' members of the graphics
state which belong to the PostScript interpreter it does not, and cannot, set the
*PostScript* graphics state colour space to the same space.

Normally this does not matter, because after the glyph is complete the colour space is
restored. However, if a currentgray/currentrgb/currentcmyk operator is executed after
the graphics library has set the space to DeviceGray, but before it has restored the
space, then the PostScript space will be incorrect. This leads to the PostScript
handling trying to access more elements from the stack than 'currentcolor' put there
(currentcolor uses the underlying space, not the PostScript space), and causes errors.

There isn't a really good way to handle this, because we can't put information about
the PostScript state into the graphics library. So I've chosen to check the underlying
colour space when processing currentgray etc, and if the space in the graphics
library is DeviceGray and does not match the expected PostScript space, then instead
of raising an error we proceed as if the PostScript space had been DeviceGray all
along.

No differences expected
Filename Latest Rev Last Changed Committer Comment Size
..
base 7059 15 years ago giles Split the source tree into two new directories. P Diff
contrib 4008 19 years ago giles Add contributed pscolor utility by Carsten Hammer. Diff
cups 6231 17 years ago giles Tell svn to ignore the generated cups scripts. Diff
doc 8617 13 years ago chrisl Merge a couple of corrections from the 9.00 tag. Diff
examples 1 24 years ago lpd Populate repository with gs 6.0 files. Diff
expat 6517 16 years ago giles Copy the expat-2.0.1 tag source into the gs tree. Diff
freetype 8508 13 years ago chrisl Update trunk to FreeType 2.4.1 The important cha Diff
icclib 1064 23 years ago raph Moves patched icclib 1.23 files into the new iccli Diff
iccprofiles 8339 14 years ago mvrhel Merge of icc_work branch into trunk. These change Diff
ijs 6983 15 years ago giles Update ignore list for the ijs directory. Diff
imdi 5472 17 years ago giles Check in working files for the GPL imdi (integer m Diff
jasper 5223 18 years ago giles Ignore common generated files. Diff
jbig2dec 8476 13 years ago alexcher Set svn:ignore property for all remaining generate Diff
jpeg 4926 18 years ago giles Copy the IJG jpeg-6b source from /tags/. Diff
jpegxr 8919 13 years ago tor Import JPEG-XR reference software. ITU-T Rec. T.8 Diff
lcms 8339 14 years ago mvrhel Merge of icc_work branch into trunk. These change Diff
lcms2 9113 13 years ago robin Initial import of LittleCMS v2.1 into the Ghostscr Diff
lib 1 24 years ago lpd Populate repository with gs 6.0 files. Diff
libpng 7986 14 years ago giles Update our included copy of the libpng source to 1 Diff
man 1 24 years ago lpd Populate repository with gs 6.0 files. Diff
psi 7059 15 years ago giles Split the source tree into two new directories. P Diff
Resource 2924 21 years ago igor Initial commit for a minimal set of resources for Diff
tiff 8476 13 years ago alexcher Set svn:ignore property for all remaining generate Diff
toolbin 229 24 years ago lpd Adds a variety of tools used to build and distrib Diff
zlib 4924 18 years ago giles Copy in tagged zlib and libpng source. Diff
.gitignore 9018 13 years ago robin Remove DOS line endings from .gitignore files. 296 bytes Diff Download File
File autogen.sh 8549 13 years ago henrys rollback to revision 11564, 11565 broke the build 959 bytes Diff Download File
File ghostscript-ufst.vcproj 8285 14 years ago robin Nudge the windows solution/makefiles closer to sup 4.8 KB Diff Download File
File ghostscript.vcproj 9113 13 years ago robin Initial import of LittleCMS v2.1 into the Ghostscr 170 KB Diff Download File
LICENSE 7580 14 years ago giles Relicense GPL Ghostscript under the GPLv3 or later 2.5 KB Diff Download File