refuse to open PSD files with insanely large dimensions (#244402, fix by
Sven Ne umann)
This commit is contained in:
parent
68e333298f
commit
e762f346ca
19
gimp-2.2.15-psd-invalid-dimensions.patch
Normal file
19
gimp-2.2.15-psd-invalid-dimensions.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- 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",
|
Loading…
Reference in New Issue
Block a user