diff options
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch')
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch new file mode 100644 index 0000000000..02b1dc962f --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 60b77b8bf8b6e4d30519c47724631012b530cf0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Liddell <chris.liddell@artifex.com> | ||
3 | Date: Sat, 15 Dec 2018 09:08:32 +0000 | ||
4 | Subject: [PATCH 3/7] Bug700317: Fix logic for an older change | ||
5 | |||
6 | Unlike almost every other function in gs, dict_find_string() returns 1 on | ||
7 | success 0 or <0 on failure. The logic for this case was wrong. | ||
8 | |||
9 | CVE: CVE-2019-6116 | ||
10 | Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] | ||
11 | |||
12 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
13 | --- | ||
14 | psi/interp.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/psi/interp.c b/psi/interp.c | ||
18 | index aa5779c..f6c45bb 100644 | ||
19 | --- a/psi/interp.c | ||
20 | +++ b/psi/interp.c | ||
21 | @@ -703,7 +703,7 @@ again: | ||
22 | * i.e. it's an internal operator we have hidden | ||
23 | */ | ||
24 | code = dict_find_string(systemdict, (const char *)bufptr, &tobj); | ||
25 | - if (code < 0) { | ||
26 | + if (code <= 0) { | ||
27 | buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-'; | ||
28 | rlen += 4; | ||
29 | bufptr = buf; | ||
30 | -- | ||
31 | 2.18.1 | ||
32 | |||