summaryrefslogtreecommitdiff
path: root/base/gximage1.c
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2017-02-07 09:42:43 -0800
committerRay Johnston <ray.johnston@artifex.com>2017-02-07 09:48:29 -0800
commita9a58bb95e4a41014f42cae9393767b26da3aa80 (patch)
tree18156f33042363909cd8675f7486a6c0e060d7e3 /base/gximage1.c
parenta65893f973c65d2ba22f8b2a2c6cf0822fc8c1da (diff)
downloadghostpdl-a9a58bb95e4a41014f42cae9393767b26da3aa80.tar.gz
Fix dangling pointer in gx_image_enum after malloc fail.
Yet another, probably a squeezing failure since it failed with: -K30000 -dMaxBitmap=0 -r300 -sDEVICE=pkmraw -o nul: tests/pdf/cmyk_blend.pdf
Diffstat (limited to 'base/gximage1.c')
-rw-r--r--base/gximage1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/gximage1.c b/base/gximage1.c
index 596955429..a1ee9e2c9 100644
--- a/base/gximage1.c
+++ b/base/gximage1.c
@@ -85,6 +85,7 @@ gx_begin_image1(gx_device * dev,
if (code < 0)
return code;
+ memset(penum, 0, sizeof(gx_image_enum)); /* in case of failure, no dangling pointers */
penum->alpha = pim->Alpha;
penum->use_mask_color = false;
penum->image_parent_type = pim->image_parent_type;