Thu Aug 15 16:26:36 2013 UTC ()
Fix build with newer giflib.


(joerg)
diff -r1.20 -r1.21 pkgsrc/graphics/imlib/distinfo
diff -r1.7 -r1.8 pkgsrc/graphics/imlib/patches/patch-ab

cvs diff -r1.20 -r1.21 pkgsrc/graphics/imlib/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/imlib/distinfo 2011/01/23 16:16:39 1.20
+++ pkgsrc/graphics/imlib/distinfo 2013/08/15 16:26:36 1.21
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
1$NetBSD: distinfo,v 1.20 2011/01/23 16:16:39 wiz Exp $ 1$NetBSD: distinfo,v 1.21 2013/08/15 16:26:36 joerg Exp $
2 2
3SHA1 (imlib-1.9.15.tar.bz2) = c9a732a354fbb3c7e1a426e5d19fc92d73f8f720 3SHA1 (imlib-1.9.15.tar.bz2) = c9a732a354fbb3c7e1a426e5d19fc92d73f8f720
4RMD160 (imlib-1.9.15.tar.bz2) = 195b80833167134ba2d9a9574d420279f9cf55f4 4RMD160 (imlib-1.9.15.tar.bz2) = 195b80833167134ba2d9a9574d420279f9cf55f4
5Size (imlib-1.9.15.tar.bz2) = 683242 bytes 5Size (imlib-1.9.15.tar.bz2) = 683242 bytes
6SHA1 (patch-aa) = fc990bb2278e6a848034f9c7be0170e1843b67b2 6SHA1 (patch-aa) = fc990bb2278e6a848034f9c7be0170e1843b67b2
7SHA1 (patch-ab) = ff9fe1b56fe42030b8e1520c4f7f0ec8862fce92 7SHA1 (patch-ab) = e4b0348a1e9d421128714ff2c97c8934ad2ab5f1
8SHA1 (patch-ac) = 7dd08bde4e97614777bf4327db2e6045db04692d 8SHA1 (patch-ac) = 7dd08bde4e97614777bf4327db2e6045db04692d
9SHA1 (patch-ad) = 1fc310d57c12337cc8ccddb7dd907330127b7112 9SHA1 (patch-ad) = 1fc310d57c12337cc8ccddb7dd907330127b7112
10SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb 10SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb
11SHA1 (patch-ag) = 7ef3980a6a3eccba41895ef86eae727cd7dfb1e2 11SHA1 (patch-ag) = 7ef3980a6a3eccba41895ef86eae727cd7dfb1e2
12SHA1 (patch-ah) = edee5311a47d552f9d1b9dcb96f256518040c538 12SHA1 (patch-ah) = edee5311a47d552f9d1b9dcb96f256518040c538
13SHA1 (patch-ai) = df13b72272f754375348437b99d962cb17732619 13SHA1 (patch-ai) = df13b72272f754375348437b99d962cb17732619
14SHA1 (patch-aj) = 60171b7341c65fb6eb0a93738fef4b2c31692bdf 14SHA1 (patch-aj) = 60171b7341c65fb6eb0a93738fef4b2c31692bdf
15SHA1 (patch-ak) = 4d7ae79f23bf0c64fd85ffebc086b7bb43207718 15SHA1 (patch-ak) = 4d7ae79f23bf0c64fd85ffebc086b7bb43207718
16SHA1 (patch-al) = 4ad51c7128f7d6a5ecc67f51c745caf53a4def06 16SHA1 (patch-al) = 4ad51c7128f7d6a5ecc67f51c745caf53a4def06
17SHA1 (patch-am) = 73c62e11f5b6ac6774e51f8183987b2b4db01465 17SHA1 (patch-am) = 73c62e11f5b6ac6774e51f8183987b2b4db01465
18SHA1 (patch-an) = 260aeece3eb74d3ec11deed4e38fd46d3f1cde79 18SHA1 (patch-an) = 260aeece3eb74d3ec11deed4e38fd46d3f1cde79
19SHA1 (patch-ao) = d4e3df56d2f743e53e73d72551ccd03491bf1c44 19SHA1 (patch-ao) = d4e3df56d2f743e53e73d72551ccd03491bf1c44

cvs diff -r1.7 -r1.8 pkgsrc/graphics/imlib/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/graphics/imlib/patches/patch-ab 2011/01/23 16:16:39 1.7
+++ pkgsrc/graphics/imlib/patches/patch-ab 2013/08/15 16:26:36 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-ab,v 1.7 2011/01/23 16:16:39 wiz Exp $ 1$NetBSD: patch-ab,v 1.8 2013/08/15 16:26:36 joerg Exp $
2 2
3Middle chunks: Fix build with png-1.5. 3Middle chunks: Fix build with png-1.5.
4Others: ??? 4Others: ???
5 5
6--- Imlib/load.c.orig 2004-09-21 00:23:20.000000000 +0000 6--- Imlib/load.c.orig 2004-09-21 00:23:20.000000000 +0000
7+++ Imlib/load.c 7+++ Imlib/load.c
8@@ -4,6 +4,8 @@ 8@@ -4,6 +4,8 @@
9 #include "Imlib_private.h" 9 #include "Imlib_private.h"
10 #include <setjmp.h> 10 #include <setjmp.h>
11  11
12+#define G_MAXINT ((int) 0x7fffffff) 12+#define G_MAXINT ((int) 0x7fffffff)
13+ 13+
14 /* Split the ID - damages input */ 14 /* Split the ID - damages input */
@@ -76,26 +76,35 @@ Others: ??? @@ -76,26 +76,35 @@ Others: ???
76 { 76 {
77 for (y = 0; y < *h; y++) 77 for (y = 0; y < *h; y++)
78@@ -360,7 +369,9 @@ _LoadTIFF(ImlibData * id, FILE *f, char  78@@ -360,7 +369,9 @@ _LoadTIFF(ImlibData * id, FILE *f, char
79 npix = ww * hh; 79 npix = ww * hh;
80 *w = (int)ww; 80 *w = (int)ww;
81 *h = (int)hh; 81 *h = (int)hh;
82- if(ww > 32767 || hh > 32767) 82- if(ww > 32767 || hh > 32767)
83+ if (ww <= 0 || ww > 32767 || 83+ if (ww <= 0 || ww > 32767 ||
84+ hh <= 0 || hh > 32767 || 84+ hh <= 0 || hh > 32767 ||
85+ hh >= (G_MAXINT/sizeof(uint32)) / ww) 85+ hh >= (G_MAXINT/sizeof(uint32)) / ww)
86 { 86 {
87 TIFFClose(tif); 87 TIFFClose(tif);
88 return NULL; 88 return NULL;
 89@@ -443,7 +454,7 @@ _LoadGIF(ImlibData * id, FILE *f, int *w
 90 fd = fileno(f);
 91 /* Apparently rewind(f) isn't sufficient */
 92 lseek(fd, (long) 0, 0);
 93- gif = DGifOpenFileHandle(fd);
 94+ gif = DGifOpenFileHandle(fd, NULL);
 95
 96 if (!gif)
 97 return NULL;
89@@ -463,7 +474,7 @@ _LoadGIF(ImlibData * id, FILE *f, int *w 98@@ -463,7 +474,7 @@ _LoadGIF(ImlibData * id, FILE *f, int *w
90 } 99 }
91 *w = gif->Image.Width; 100 *w = gif->Image.Width;
92 *h = gif->Image.Height; 101 *h = gif->Image.Height;
93- if (*h > 32767 || *w > 32767) 102- if (*h > 32767 || *w > 32767)
94+ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767) 103+ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
95 { 104 {
96 return NULL; 105 return NULL;
97 } 106 }
98@@ -1000,7 +1011,12 @@ _LoadXPM(ImlibData * id, FILE *file, int 107@@ -1000,7 +1011,12 @@ _LoadXPM(ImlibData * id, FILE *file, int
99 comment = 0; 108 comment = 0;
100 quote = 0; 109 quote = 0;
101 context = 0; 110 context = 0;