pkgsrc/print/ghostscript-gpl/patches/patch-CVE-2017-5951

24 lines
1 KiB
Text

$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;
}
}