diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-06-08 06:17:04 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-06-08 06:17:04 +0000 |
commit | c4d50a75bb147c3ef861a9850361b4ae7495ae64 (patch) | |
tree | c34cb8aa7afbcee9ee577796bfc16d1165783ca9 | |
parent | b434b8c6a8ee94f9d3fde77f238bab58d28c1311 (diff) | |
download | aports-c4d50a75bb147c3ef861a9850361b4ae7495ae64.tar.bz2 aports-c4d50a75bb147c3ef861a9850361b4ae7495ae64.tar.xz |
main/tiff: jpeg fixes
-rw-r--r-- | main/tiff/APKBUILD | 9 | ||||
-rw-r--r-- | main/tiff/tiff-jpegfix.patch | 31 |
2 files changed, 37 insertions, 3 deletions
diff --git a/main/tiff/APKBUILD b/main/tiff/APKBUILD index c13e26a46..e2fff0cf0 100644 --- a/main/tiff/APKBUILD +++ b/main/tiff/APKBUILD @@ -1,8 +1,8 @@ -# Contributor: Michael Mason <ms13sp@gmail.com> +# Contributor: Leonardo Arena <rnalrd@gmail.com> # Maintainer: Michael Mason <ms13sp@gmail.com> pkgname=tiff pkgver=3.8.2 -pkgrel=2 +pkgrel=3 pkgdesc="Provides support for the Tag Image File Format or TIFF" url="http://www.libtiff.org/" license="GPL" @@ -16,6 +16,7 @@ source="ftp://ftp.remotesensing.org/pub/lib$pkgname/$pkgname-$pkgver.tar.gz tiff2pdf-compression.patch tiff2pdf-octal-printf.patch tiffsplit-fname-overflow.patch + tiff-jpegfix.patch " build() { @@ -28,6 +29,7 @@ build() { patch -p1 < ../tiff-3.8.2-CVE-2008-2327.patch || return 1 patch -p1 < ../libtiff-CVE-2009-2285.patch || return 1 patch -p1 < ../tiff-3.8.2-CVE-2009-2347.patch || return 1 + patch -p1 < ../tiff-jpegfix.patch || return 1 ./configure --prefix=/usr \ --sysconfdir=/etc \ @@ -46,4 +48,5 @@ c2c2e22557d9c63011df5777dda6a86b tiff-3.8.2-CVE-2008-2327.patch d3b02693cca83e63005b162edd43016b tiff-3.8.2-CVE-2009-2347.patch b443ffca9d498bb3a88c17da0200025b tiff2pdf-compression.patch d54368687d2645ffbbe6c2df384b11bf tiff2pdf-octal-printf.patch -323352fd60a7bd3ffac8724c3c031669 tiffsplit-fname-overflow.patch" +323352fd60a7bd3ffac8724c3c031669 tiffsplit-fname-overflow.patch +3353687eba89179f55f027bd571a63f5 tiff-jpegfix.patch" diff --git a/main/tiff/tiff-jpegfix.patch b/main/tiff/tiff-jpegfix.patch new file mode 100644 index 000000000..ca57191df --- /dev/null +++ b/main/tiff/tiff-jpegfix.patch @@ -0,0 +1,31 @@ +diff -Nru tiff-3.9.2.orig/libtiff/tif_jpeg.c tiff-3.9.2/libtiff/tif_jpeg.c +--- tiff-3.9.2.orig/libtiff/tif_jpeg.c 2009-12-22 12:45:49.969811264 -0800 ++++ tiff-3.9.2/libtiff/tif_jpeg.c 2009-12-22 12:47:04.433491064 -0800 +@@ -2014,7 +2014,14 @@ + if( tif->tif_diroff == 0 ) + { + #define SIZE_OF_JPEGTABLES 2000 ++/* ++The following line assumes incorrectly that all JPEG-in-TIFF files will have ++a JPEGTABLES tag generated and causes null-filled JPEGTABLES tags to be written ++when the JPEG data is placed with TIFFWriteRawStrip. The field bit should be ++set, anyway, later when actual JPEGTABLES header is generated, so removing it ++here hopefully is harmless. + TIFFSetFieldBit(tif, FIELD_JPEGTABLES); ++*/ + sp->jpegtables_length = SIZE_OF_JPEGTABLES; + sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length); + _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES); +diff -Nru tiff-3.9.2.orig/tools/tiff2pdf.c tiff-3.9.2/tools/tiff2pdf.c +--- tiff-3.9.2.orig/tools/tiff2pdf.c 2009-12-22 12:45:49.873825856 -0800 ++++ tiff-3.9.2/tools/tiff2pdf.c 2009-12-22 12:48:16.558526392 -0800 +@@ -3320,6 +3320,9 @@ + while(i<(*striplength)){ + switch( strip[i] ){ + case 0xd8: ++ /* SOI - start of image */ ++ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2); ++ *bufferoffset+=2; + i+=2; + break; + case 0xc0: |