2013-09-26 17:14:40 +02:00

16 lines
443 B
Plaintext

$NetBSD: patch-al,v 1.1 2004/12/10 09:30:42 salo Exp $
--- gdk_imlib/io-tiff.c.orig 2002-03-04 18:06:29.000000000 +0100
+++ gdk_imlib/io-tiff.c 2004-12-10 10:00:56.000000000 +0100
@@ -36,7 +36,9 @@
npix = ww * hh;
*w = (int)ww;
*h = (int)hh;
- if(ww > 32767 || hh > 32767)
+ if (ww <= 0 || ww > 32767 ||
+ hh <= 0 || hh > 32767 ||
+ hh >= (G_MAXINT/sizeof(uint32)) / ww)
{
TIFFClose(tif);
return NULL;