diff options
author | tron <tron@pkgsrc.org> | 2007-05-26 15:00:22 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2007-05-26 15:00:22 +0000 |
commit | 2b13b684cf3cc06c6e4077109ddb17f786be5100 (patch) | |
tree | 44cd8b6f3f44281b3e4811be8c14fc97a3537ec6 /graphics/gimp/patches | |
parent | 48521db4fb51c3db059c4e98ea46cc767e8e9941 (diff) | |
download | pkgsrc-2b13b684cf3cc06c6e4077109ddb17f786be5100.tar.gz |
Add patch from GIMP SVN repository to fix the vulnerability reported
in CVE-2007-2356. Bump package revision.
Diffstat (limited to 'graphics/gimp/patches')
-rw-r--r-- | graphics/gimp/patches/patch-ac | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/graphics/gimp/patches/patch-ac b/graphics/gimp/patches/patch-ac new file mode 100644 index 00000000000..cf388eb9eab --- /dev/null +++ b/graphics/gimp/patches/patch-ac @@ -0,0 +1,51 @@ +$NetBSD: patch-ac,v 1.14 2007/05/26 15:00:23 tron Exp $ + +--- plug-ins/common/sunras.c.orig 2007-04-17 22:11:23.000000000 +0100 ++++ plug-ins/common/sunras.c 2007-05-26 15:40:09.000000000 +0100 +@@ -102,8 +102,7 @@ + gint32 image_ID, + gint32 drawable_ID); + +-static void set_color_table (gint32, L_SUNFILEHEADER *, unsigned char *); +- ++static void set_color_table (gint32, L_SUNFILEHEADER *, const guchar *); + static gint32 create_new_image (const gchar *filename, + guint width, + guint height, +@@ -865,19 +864,20 @@ + static void + set_color_table (gint32 image_ID, + L_SUNFILEHEADER *sunhdr, +- guchar *suncolmap) ++ const guchar *suncolmap) + { +- int ncols, j; +- guchar ColorMap[256*3]; ++ guchar ColorMap[256 * 3]; ++ gint ncols, j; + + ncols = sunhdr->l_ras_maplength / 3; +- if (ncols <= 0) return; ++ if (ncols <= 0) ++ return; + +- for (j = 0; j < ncols; j++) ++ for (j = 0; j < MIN (ncols, 256); j++) + { +- ColorMap[j*3] = suncolmap[j]; +- ColorMap[j*3+1] = suncolmap[j+ncols]; +- ColorMap[j*3+2] = suncolmap[j+2*ncols]; ++ ColorMap[j * 3 + 0] = suncolmap[j]; ++ ColorMap[j * 3 + 1] = suncolmap[j + ncols]; ++ ColorMap[j * 3 + 2] = suncolmap[j + 2 * ncols]; + } + + #ifdef DEBUG +@@ -886,6 +886,7 @@ + printf ("%3d: 0x%02x 0x%02x 0x%02x\n", j, + ColorMap[j*3], ColorMap[j*3+1], ColorMap[j*3+2]); + #endif ++ + gimp_image_set_colormap (image_ID, ColorMap, ncols); + } + |