summaryrefslogtreecommitdiff
path: root/graphics/imlib/patches/patch-al
blob: 86215cc416a62a3603f4489656482c68ecbdbc32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-al,v 1.1.2.2 2004/12/13 18:03:27 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;