components/gd2/patches/004-gd2-2.0.35-CVE-2009-3546.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Wed, 13 Apr 2011 09:58:06 -0700
changeset 181 87e11e685b1f
parent 130 5e67396e42dc
permissions -rw-r--r--
7003927 userland should postprocess packaged files 7034188 userland should have common lint library rules 7034992 userland packages should include opensolaris.arc_url data 7019309 move ghostscript to userland (fix build)

# 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))