summaryrefslogtreecommitdiff
path: root/media-libs/tiff/files/tiff-4.0.7-bug2607.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/tiff/files/tiff-4.0.7-bug2607.patch')
-rw-r--r--media-libs/tiff/files/tiff-4.0.7-bug2607.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/media-libs/tiff/files/tiff-4.0.7-bug2607.patch b/media-libs/tiff/files/tiff-4.0.7-bug2607.patch
deleted file mode 100644
index 532259e91cb9..000000000000
--- a/media-libs/tiff/files/tiff-4.0.7-bug2607.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c99f44478d6f0491da5b98c8cea14f565a021e22 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sat, 3 Dec 2016 15:44:15 +0000
-Subject: [PATCH] * tools/tiffcp.c: avoid potential division by zero is
- BitsPerSamples tag is missing. Reported by Agostino Sarubbo. Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2607
-
----
- ChangeLog | 7 +++++++
- tools/tiffcp.c | 10 ++++++++--
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/tools/tiffcp.c b/tools/tiffcp.c
-index c8e48c3c2bb3..142cbb0ecfc2 100644
---- a/tools/tiffcp.c
-+++ b/tools/tiffcp.c
-@@ -1569,7 +1569,7 @@ DECLAREwriteFunc(writeBufferToSeparateTiles)
- uint8* bufp = (uint8*) buf;
- uint32 tl, tw;
- uint32 row;
-- uint16 bps, bytes_per_sample;
-+ uint16 bps = 0, bytes_per_sample;
-
- obuf = _TIFFmalloc(TIFFTileSize(out));
- if (obuf == NULL)
-@@ -1578,6 +1578,12 @@ DECLAREwriteFunc(writeBufferToSeparateTiles)
- (void) TIFFGetField(out, TIFFTAG_TILELENGTH, &tl);
- (void) TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw);
- (void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps);
-+ if( bps == 0 )
-+ {
-+ TIFFError(TIFFFileName(out), "Error, cannot read BitsPerSample");
-+ _TIFFfree(obuf);
-+ return 0;
-+ }
- assert( bps % 8 == 0 );
- bytes_per_sample = bps/8;
-
---
-2.12.0
-