diff options
Diffstat (limited to 'app-text/ghostscript-gpl/files/VU332928-githashc3476dde.patch')
-rw-r--r-- | app-text/ghostscript-gpl/files/VU332928-githashc3476dde.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/app-text/ghostscript-gpl/files/VU332928-githashc3476dde.patch b/app-text/ghostscript-gpl/files/VU332928-githashc3476dde.patch new file mode 100644 index 00000000..6c9c3aee --- /dev/null +++ b/app-text/ghostscript-gpl/files/VU332928-githashc3476dde.patch @@ -0,0 +1,44 @@ +From: Chris Liddell <chris.liddell@artifex.com> +Date: Tue, 21 Aug 2018 15:42:45 +0000 (+0100) +Subject: Bug 699656: Handle LockDistillerParams not being a boolean +X-Git-Tag: ghostpdl-9.24rc1~23 +X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=c3476dde + +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. +--- + +diff --git a/devices/vector/gdevpdfp.c b/devices/vector/gdevpdfp.c +index e942682..7c58af7 100644 +--- a/devices/vector/gdevpdfp.c ++++ b/devices/vector/gdevpdfp.c +@@ -364,7 +364,7 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par + * LockDistillerParams is read again, and reset if necessary, in + * psdf_put_params. + */ +- ecode = param_read_bool(plist, "LockDistillerParams", &locked); ++ ecode = param_read_bool(plist, (param_name = "LockDistillerParams"), &locked); + if (ecode < 0) + param_signal_error(plist, param_name, ecode); + +diff --git a/psi/iparam.c b/psi/iparam.c +index 68c20d4..0279455 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; |