21516009 problem in UTILITY/GHOSTSCRIPT s11u3-sru
authorsrikantha pandrahalli<srikantha.pandrahalli@oracle.com>
Wed, 03 Aug 2016 22:12:16 -0700
branchs11u3-sru
changeset 6545 5adda0d0f036
parent 6539 87c707918565
child 6549 bb0979089d4d
21516009 problem in UTILITY/GHOSTSCRIPT
components/ghostscript/patches/23044678.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ghostscript/patches/23044678.patch	Wed Aug 03 22:12:16 2016 -0700
@@ -0,0 +1,15 @@
+The patch has been taken from community and fixes Integer overflow.
+The details can be found in the following location
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=0c0b0859
+
+--- ghostscript-9.00/base/gsmalloc.c	Thu Apr 29 11:32:44 2010
++++ ghostscript-9.00/base/gsmalloc.c	Tue Aug 11 03:28:23 2015
[email protected]@ -177,7 +177,7 @@
+     } else {
+ 	uint added = size + sizeof(gs_malloc_block_t);
+ 
+-	if (mmem->limit - added < mmem->used)
++	if (added <= size || mmem->limit - added < mmem->used)
+ 	    set_msg("exceeded limit");
+ 	else if ((ptr = (byte *) malloc(added)) == 0)
+ 	    set_msg("failed");