components/ghostscript/patches/24808169.patch
author saurabh.vyas@oracle.com
Thu, 30 Mar 2017 20:50:08 -0700
changeset 7819 b1bca76ec901
permissions -rw-r--r--
PSARC/2015/272 Ghostscript 9.20 16354273 Upgrade ghostscript to 9.20 24808169 problem in UTILITY/GHOSTSCRIPT 24808123 problem in UTILITY/GHOSTSCRIPT 24807899 problem in UTILITY/GHOSTSCRIPT 24807607 problem in UTILITY/GHOSTSCRIPT 23148723 Regression caused due to -x04 optimisation with /usr/bin/amd64/gs on S12_97 25054202 ghostscript 9.20 build fails with restrict qualifier

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;