components/ghostscript/patches/24808169.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 18 Apr 2017 09:10:22 -0700
changeset 7898 b6036d22c840
parent 7819 b1bca76ec901
permissions -rw-r--r--
25757790 Update squid to version 3.5.24

The patch has been taken from community and fixes Integer overflow.
The details can be found in the following location
https://bugs.ghostscript.com/show_bug.cgi?id=697190

--- ghostscript-9.20/psi/zdscpars.c	2016-09-26 03:41:29.000000000 -0700
+++ ghostscript-9.20/psi/zdscpars.c	2016-11-23 21:29:07.736373458 -0800
@@ -150,11 +150,16 @@
     ref local_ref;
     int code;
     os_ptr const op = osp;
-    dict * const pdict = op->value.pdict;
-    gs_memory_t * const mem = (gs_memory_t *)dict_memory(pdict);
-    dsc_data_t * const data =
-        gs_alloc_struct(mem, dsc_data_t, &st_dsc_data_t, "DSC parser init");
+    dict *pdict;
+    gs_memory_t *mem;
+    dsc_data_t *data;
 
+    check_read_type(*op, t_dictionary);
+
+    pdict = op->value.pdict;
+    mem = (gs_memory_t *)dict_memory(pdict);
+
+    data = gs_alloc_struct(mem, dsc_data_t, &st_dsc_data_t, "DSC parser init");
     if (!data)
         return_error(gs_error_VMerror);
     data->document_level = 0;