summaryrefslogtreecommitdiff
path: root/psi/iparam.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2018-08-21 16:42:45 +0100
committerChris Liddell <chris.liddell@artifex.com>2018-08-23 10:23:18 +0100
commitc3476dde7743761a4e1d39a631716199b696b880 (patch)
tree4ca833724bde990b9a1b2712fb70b1d53e13e963 /psi/iparam.c
parentb326a71659b7837d3acde954b18bda1a6f5e9498 (diff)
downloadghostpdl-c3476dde7743761a4e1d39a631716199b696b880.tar.gz
Bug 699656: Handle LockDistillerParams not being a boolean
This caused a function call commented as "Can't fail" to fail, and resulted in memory correuption and a segfault.
Diffstat (limited to 'psi/iparam.c')
-rw-r--r--psi/iparam.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/psi/iparam.c b/psi/iparam.c
index 68c20d4d2..0279455cf 100644
--- a/psi/iparam.c
+++ b/psi/iparam.c
@@ -822,10 +822,11 @@ static int
ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code)
{
iparam_list *const iplist = (iparam_list *) plist;
- iparam_loc loc;
+ iparam_loc loc = {0};
- ref_param_read(iplist, pkey, &loc, -1); /* can't fail */
- *loc.presult = code;
+ ref_param_read(iplist, pkey, &loc, -1);
+ if (loc.presult)
+ *loc.presult = code;
switch (ref_param_read_get_policy(plist, pkey)) {
case gs_param_policy_ignore:
return 0;