Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 95931d60fe986cb88dac43d05c397ef3 > files > 22

gimp-2.2.13-2.0.10.el5.src.rpm

diff -up gimp-2.2.13/plug-ins/common/sunras.c.sunras-validate-size-values gimp-2.2.13/plug-ins/common/sunras.c
--- gimp-2.2.13/plug-ins/common/sunras.c.sunras-validate-size-values	2007-09-10 16:00:12.000000000 +0200
+++ gimp-2.2.13/plug-ins/common/sunras.c	2007-09-10 16:00:12.000000000 +0200
@@ -401,6 +401,12 @@ load_image (const gchar *filename)
       return (-1);
     }
 
+  if ((sunhdr.l_ras_maplength < 0) || (sunhdr.l_ras_maplength > (256 * 3)))
+    {
+      g_message ("Map lengths greater than 256 entries are unsupported by GIMP.");
+      gimp_quit ();
+    }
+
   /* Is there a RGB colourmap ? */
   if ((sunhdr.l_ras_maptype == 1) && (sunhdr.l_ras_maplength > 0))
     {
diff -U0 gimp-2.2.13/ChangeLog.sunras-validate-size-values gimp-2.2.13/ChangeLog
--- gimp-2.2.13/ChangeLog.sunras-validate-size-values	2007-09-10 16:00:12.000000000 +0200
+++ gimp-2.2.13/ChangeLog	2007-09-10 16:00:12.000000000 +0200
@@ -3 +3 @@
-	Merged from trunk (patch written by Mukund):
+	Merged from trunk (patches written by Mukund):
@@ -5 +5,2 @@
-	* plug-ins/common/psd.c: validate size values read from files
+	* plug-ins/common/psd.c
+	* plug-ins/common/sunras.c: validate size values read from files