components/gd2/patches/004-gd2-2.0.35-CVE-2009-3546.patch
author April Chin <april.chin@oracle.com>
Mon, 13 Jul 2015 14:34:13 -0700
branchs11u2-sru
changeset 4672 b5cd74af63e5
parent 130 5e67396e42dc
permissions -rw-r--r--
20868321 upgrade GNU patch to version 2.7.5 20359989 problem in UTILITY/GPATCH 20102835 patch crashes due to uninitialized data structure

# Patch for libgd2 Version 2.0.35 CVE-2009-3546
--- gd_gd.c	2006-04-05 08:52:22.000000000 -0700
+++ gd_gd.c	2011-02-16 17:57:09.865711091 -0800
@@ -44,6 +44,10 @@
 	    {
 	      goto fail1;
 	    }
+	  if (im->colorsTotal > gdMaxColors)
+	    {
+		goto fail1;
+	    }
 	}
       /* Int to accommodate truecolor single-color transparency */
       if (!gdGetInt (&im->transparent, in))