diff options
author | taca <taca> | 2006-08-03 15:17:49 +0000 |
---|---|---|
committer | taca <taca> | 2006-08-03 15:17:49 +0000 |
commit | 01c659eedc3ee0844a902815a645c20a77fa0da4 (patch) | |
tree | 39e3e61e43b4f0c9343f102f2933eab78c8c33fd /graphics/tiff/patches | |
parent | d73da3e3082c6a01a401dd87c66f62b03d949dbe (diff) | |
download | pkgsrc-01c659eedc3ee0844a902815a645c20a77fa0da4.tar.gz |
Modify patch to tif_dir.c to be compiled by gcc prior to 3.x.
Requested by solo@.
Diffstat (limited to 'graphics/tiff/patches')
-rw-r--r-- | graphics/tiff/patches/patch-av | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/graphics/tiff/patches/patch-av b/graphics/tiff/patches/patch-av index 3e70af3d269..3ddb3c59ff5 100644 --- a/graphics/tiff/patches/patch-av +++ b/graphics/tiff/patches/patch-av @@ -1,9 +1,9 @@ -$NetBSD: patch-av,v 1.5 2006/08/02 15:42:25 salo Exp $ +$NetBSD: patch-av,v 1.6 2006/08/03 15:17:49 taca Exp $ Security fix for SA21304. ---- libtiff/tif_dir.c.orig 2006-03-21 17:42:50.000000000 +0100 -+++ libtiff/tif_dir.c 2006-08-02 17:18:41.000000000 +0200 +--- libtiff/tif_dir.c.orig Wed Mar 22 01:42:50 2006 ++++ libtiff/tif_dir.c @@ -122,6 +122,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va { static const char module[] = "_TIFFVSetField"; @@ -12,11 +12,14 @@ Security fix for SA21304. TIFFDirectory* td = &tif->tif_dir; int status = 1; uint32 v32, i, v; -@@ -195,10 +196,12 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va +@@ -193,15 +194,18 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va + td->td_fillorder = (uint16) v; break; - case TIFFTAG_ORIENTATION: - v = va_arg(ap, uint32); + break; +- case TIFFTAG_ORIENTATION: ++ case TIFFTAG_ORIENTATION: { + const TIFFFieldInfo* fip; + v = va_arg(ap, uint32); if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) { + fip = _TIFFFieldWithTag(tif, tag); TIFFWarningExt(tif->tif_clientdata, tif->tif_name, @@ -26,7 +29,11 @@ Security fix for SA21304. } else td->td_orientation = (uint16) v; break; -@@ -387,11 +390,15 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va ++ } + case TIFFTAG_SAMPLESPERPIXEL: + /* XXX should cross check -- e.g. if pallette, then 1 */ + v = va_arg(ap, uint32); +@@ -387,11 +391,15 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va * happens, for example, when tiffcp is used to convert between * compression schemes and codec-specific tags are blindly copied. */ @@ -43,7 +50,7 @@ Security fix for SA21304. status = 0; break; } -@@ -468,7 +475,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va +@@ -468,7 +476,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va if (fip->field_type == TIFF_ASCII) _TIFFsetString((char **)&tv->value, va_arg(ap, char *)); else { @@ -52,7 +59,7 @@ Security fix for SA21304. if (!tv->value) { status = 0; goto end; -@@ -563,7 +570,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va +@@ -563,7 +571,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va } } if (status) { @@ -61,7 +68,7 @@ Security fix for SA21304. tif->tif_flags |= TIFF_DIRTYDIRECT; } -@@ -572,12 +579,12 @@ end: +@@ -572,12 +580,12 @@ end: return (status); badvalue: TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad value %d for \"%s\"", @@ -76,7 +83,7 @@ Security fix for SA21304. va_end(ap); return (0); } -@@ -813,12 +820,16 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va +@@ -813,12 +821,16 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va * If the client tries to get a tag that is not valid * for the image's codec then we'll arrive here. */ |