summaryrefslogtreecommitdiff
path: root/base/gxclimag.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2016-12-09 10:43:57 +0000
committerChris Liddell <chris.liddell@artifex.com>2016-12-09 10:43:57 +0000
commit8894abf2985a58900e778957f93151b6cec1c17a (patch)
tree6e6fd3642afc5566fa6df7982da5d674699431c1 /base/gxclimag.c
parent4b3be091fa0384e679baaf04b14ea195da5adf21 (diff)
downloadghostpdl-8894abf2985a58900e778957f93151b6cec1c17a.tar.gz
Address a segfault and error introduced in 4b3be09
In the zbegintransparencymaskgroup with a '/None' SMask parameter with the clist in use, we get to clist_create_compositor(). In there, the return value of the get_cropping method can be either an error (negative) or a specific cropping operation (positive). We assign it to 'code', and if it's an error, return it, if not, assign it to another variable. But don't set 'code' to anything else. It is then possible to get to the end of the function without going through the path where 'code' is used again. Setting 'code' to 0 after storing the cropping op solves the problem.
Diffstat (limited to 'base/gxclimag.c')
-rw-r--r--base/gxclimag.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/gxclimag.c b/base/gxclimag.c
index 8d9027137..016e56e14 100644
--- a/base/gxclimag.c
+++ b/base/gxclimag.c
@@ -1270,6 +1270,7 @@ clist_create_compositor(gx_device * dev,
return code;
cropping_op = code;
+ code = 0;
if (cropping_op == PUSHCROP || cropping_op == SAMEAS_PUSHCROP_BUTNOPUSH) {
first_band = ry / band_height;