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