diff -Naur gimp-2.2.15/plug-ins/common/psd.c gimp-2.2.15-fixed/plug-ins/common/psd.c --- gimp-2.2.15/plug-ins/common/psd.c 2007-04-17 23:11:24.000000000 +0200 +++ gimp-2.2.15-fixed/plug-ins/common/psd.c 2007-07-04 12:01:14.000000000 +0200 @@ -1188,7 +1188,7 @@ static void seek_to_and_unpack_pixeldata(FILE* fd, gint layeri, gint channeli) { - int width, height; + gint width, height; guchar *tmpline; gint compression; guint32 offset = 0; @@ -1202,6 +1202,12 @@ width = channel->width; height = channel->height; + if (width > G_MAXINT16 || height > G_MAXINT16) + { + g_message ("Error: Invalid channel dimensions"); + gimp_quit (); + } + IFDBG { printf("\t\t\tLayer (%d) Channel (%d:%d) Compression: %d (%s)\n",