aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-06-08 06:17:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-08 06:34:01 +0000
commitad584bdb8be6b4b7868fa888adecb8a9ef543d50 (patch)
tree18d285578d05a7b5d439cd2fce5a4577986a2af7
parent3441878381a325b3f03419e66cfae5dc92fef9a8 (diff)
downloadalpine_aports-ad584bdb8be6b4b7868fa888adecb8a9ef543d50.tar.bz2
alpine_aports-ad584bdb8be6b4b7868fa888adecb8a9ef543d50.tar.xz
alpine_aports-ad584bdb8be6b4b7868fa888adecb8a9ef543d50.zip
main/tiff: jpeg fixes
-rw-r--r--main/tiff/APKBUILD9
-rw-r--r--main/tiff/tiff-jpegfix.patch31
2 files changed, 37 insertions, 3 deletions
diff --git a/main/tiff/APKBUILD b/main/tiff/APKBUILD
index 4b34846518..e2fff0cf0a 100644
--- a/main/tiff/APKBUILD
+++ b/main/tiff/APKBUILD
@@ -1,8 +1,8 @@
1# Contributor: Michael Mason <ms13sp@gmail.com> 1# Contributor: Leonardo Arena <rnalrd@gmail.com>
2# Maintainer: Michael Mason <ms13sp@gmail.com> 2# Maintainer: Michael Mason <ms13sp@gmail.com>
3pkgname=tiff 3pkgname=tiff
4pkgver=3.8.2 4pkgver=3.8.2
5pkgrel=1 5pkgrel=3
6pkgdesc="Provides support for the Tag Image File Format or TIFF" 6pkgdesc="Provides support for the Tag Image File Format or TIFF"
7url="http://www.libtiff.org/" 7url="http://www.libtiff.org/"
8license="GPL" 8license="GPL"
@@ -16,6 +16,7 @@ source="ftp://ftp.remotesensing.org/pub/lib$pkgname/$pkgname-$pkgver.tar.gz
16 tiff2pdf-compression.patch 16 tiff2pdf-compression.patch
17 tiff2pdf-octal-printf.patch 17 tiff2pdf-octal-printf.patch
18 tiffsplit-fname-overflow.patch 18 tiffsplit-fname-overflow.patch
19 tiff-jpegfix.patch
19 " 20 "
20 21
21build() { 22build() {
@@ -28,6 +29,7 @@ build() {
28 patch -p1 < ../tiff-3.8.2-CVE-2008-2327.patch || return 1 29 patch -p1 < ../tiff-3.8.2-CVE-2008-2327.patch || return 1
29 patch -p1 < ../libtiff-CVE-2009-2285.patch || return 1 30 patch -p1 < ../libtiff-CVE-2009-2285.patch || return 1
30 patch -p1 < ../tiff-3.8.2-CVE-2009-2347.patch || return 1 31 patch -p1 < ../tiff-3.8.2-CVE-2009-2347.patch || return 1
32 patch -p1 < ../tiff-jpegfix.patch || return 1
31 33
32 ./configure --prefix=/usr \ 34 ./configure --prefix=/usr \
33 --sysconfdir=/etc \ 35 --sysconfdir=/etc \
@@ -46,4 +48,5 @@ c2c2e22557d9c63011df5777dda6a86b tiff-3.8.2-CVE-2008-2327.patch
46d3b02693cca83e63005b162edd43016b tiff-3.8.2-CVE-2009-2347.patch 48d3b02693cca83e63005b162edd43016b tiff-3.8.2-CVE-2009-2347.patch
47b443ffca9d498bb3a88c17da0200025b tiff2pdf-compression.patch 49b443ffca9d498bb3a88c17da0200025b tiff2pdf-compression.patch
48d54368687d2645ffbbe6c2df384b11bf tiff2pdf-octal-printf.patch 50d54368687d2645ffbbe6c2df384b11bf tiff2pdf-octal-printf.patch
49323352fd60a7bd3ffac8724c3c031669 tiffsplit-fname-overflow.patch" 51323352fd60a7bd3ffac8724c3c031669 tiffsplit-fname-overflow.patch
523353687eba89179f55f027bd571a63f5 tiff-jpegfix.patch"
diff --git a/main/tiff/tiff-jpegfix.patch b/main/tiff/tiff-jpegfix.patch
new file mode 100644
index 0000000000..ca57191dff
--- /dev/null
+++ b/main/tiff/tiff-jpegfix.patch
@@ -0,0 +1,31 @@
1diff -Nru tiff-3.9.2.orig/libtiff/tif_jpeg.c tiff-3.9.2/libtiff/tif_jpeg.c
2--- tiff-3.9.2.orig/libtiff/tif_jpeg.c 2009-12-22 12:45:49.969811264 -0800
3+++ tiff-3.9.2/libtiff/tif_jpeg.c 2009-12-22 12:47:04.433491064 -0800
4@@ -2014,7 +2014,14 @@
5 if( tif->tif_diroff == 0 )
6 {
7 #define SIZE_OF_JPEGTABLES 2000
8+/*
9+The following line assumes incorrectly that all JPEG-in-TIFF files will have
10+a JPEGTABLES tag generated and causes null-filled JPEGTABLES tags to be written
11+when the JPEG data is placed with TIFFWriteRawStrip. The field bit should be
12+set, anyway, later when actual JPEGTABLES header is generated, so removing it
13+here hopefully is harmless.
14 TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
15+*/
16 sp->jpegtables_length = SIZE_OF_JPEGTABLES;
17 sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length);
18 _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES);
19diff -Nru tiff-3.9.2.orig/tools/tiff2pdf.c tiff-3.9.2/tools/tiff2pdf.c
20--- tiff-3.9.2.orig/tools/tiff2pdf.c 2009-12-22 12:45:49.873825856 -0800
21+++ tiff-3.9.2/tools/tiff2pdf.c 2009-12-22 12:48:16.558526392 -0800
22@@ -3320,6 +3320,9 @@
23 while(i<(*striplength)){
24 switch( strip[i] ){
25 case 0xd8:
26+ /* SOI - start of image */
27+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2);
28+ *bufferoffset+=2;
29 i+=2;
30 break;
31 case 0xc0: