summaryrefslogtreecommitdiff
path: root/print/ghostscript-gpl/patches/patch-CVE-2017-5951
blob: 6a2a2a18850e906837259dc2622ec708f74db5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-CVE-2017-5951,v 1.1 2017/04/18 22:07:07 tez Exp $

Patch for CVE-2017-5951 from
 http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=bfa6b2ec

--- psi/iparam.c.orig	2017-04-06 19:05:43.573183800 +0000
+++ psi/iparam.c
@@ -770,12 +770,13 @@ ref_param_read_typed(gs_param_list * pli
                 gs_param_enumerator_t enumr;
                 gs_param_key_t key;
                 ref_type keytype;
+		dict_param_list *dlist = (dict_param_list *) pvalue->value.d.list;
 
                 param_init_enumerator(&enumr);
-                if (!(*((iparam_list *) plist)->enumerate)
-                    ((iparam_list *) pvalue->value.d.list, &enumr, &key, &keytype)
+		if (!(*(dlist->enumerate))
+		    ((iparam_list *) dlist, &enumr, &key, &keytype)
                     && keytype == t_integer) {
-                    ((dict_param_list *) pvalue->value.d.list)->int_keys = 1;
+                    dlist->int_keys = 1;
                     pvalue->type = gs_param_type_dict_int_keys;
                 }
             }