--- gimp-2.2.15/plug-ins/common/psd.c.psd-invalid-dimensions 2007-04-17 23:11:24.000000000 +0200 +++ gimp-2.2.15/plug-ins/common/psd.c 2007-06-27 13:06:24.000000000 +0200 @@ -1199,9 +1199,15 @@ seek_to_and_unpack_pixeldata(FILE* fd, g compression = getgshort(fd, "layer channel compression type"); offset+=2; - width = channel->width; + 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",