opt/ghostscript/ghostpdl.git-b326a716.patch

27 lines
941 B
Diff

From: Chris Liddell <chris.liddell@artifex.com>
Date: Tue, 21 Aug 2018 15:24:05 +0000 (+0100)
Subject: Bug 699655: Properly check the return value....
X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=b326a716
Bug 699655: Properly check the return value....
...when getting a value from a dictionary
---
diff --git a/psi/zcolor.c b/psi/zcolor.c
index 4c0f258..e27baf9 100644
--- a/psi/zcolor.c
+++ b/psi/zcolor.c
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ return code;
+ if (code > 0) {
code = array_get(imemory, pImpl, 0, &pPatInst);
if (code < 0)
return code;