Accepting request 181002 from graphics

- tiff2pdf: introduced warning when the compression isn't lzw or
  none [bnc#819142]
- tiff2pdf: fixed crash [bnc#821872]

OBS-URL: https://build.opensuse.org/request/show/181002
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tiff?expand=0&rev=47
This commit is contained in:
Stephan Kulow 2013-06-28 17:29:18 +00:00 committed by Git OBS Bridge
commit 290d032531
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,20 @@
Index: tiff-4.0.3/tools/tiff2pdf.c
===================================================================
--- tiff-4.0.3.orig/tools/tiff2pdf.c
+++ tiff-4.0.3/tools/tiff2pdf.c
@@ -1264,6 +1264,15 @@ void t2p_read_tiff_data(T2P* t2p, TIFF*
return;
}
+ if(t2p->tiff_compression != COMPRESSION_LZW &&
+ t2p->tiff_compression != COMPRESSION_NONE){
+ TIFFWarning(
+ TIFF2PDF_MODULE,
+ "%s is not compressed with LZW or NONE.\n"
+ "tiff2pdf result may be incorrect in that case.\n"
+ "Consider to use tiffcp(1) to change compress algorithm first.",
+ TIFFFileName(input) );
+ }
if( TIFFIsCODECConfigured(t2p->tiff_compression) == 0){
TIFFError(
TIFF2PDF_MODULE,

View File

@ -0,0 +1,13 @@
Index: tools/tiff2pdf.c
===================================================================
--- tools/tiff2pdf.c.orig
+++ tools/tiff2pdf.c
@@ -2436,7 +2436,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p
TIFFReadEncodedStrip(input,
i,
(tdata_t) &buffer[bufferoffset],
- stripsize);
+ TIFFmin(stripsize, t2p->tiff_datasize - bufferoffset));
if(read==-1){
TIFFError(TIFF2PDF_MODULE,
"Error on decoding strip %u of %s",

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jun 26 10:48:50 UTC 2013 - pgajdos@suse.com
- tiff2pdf: introduced warning when the compression isn't lzw or
none [bnc#819142]
- tiff2pdf: fixed crash [bnc#821872]
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 30 13:20:50 UTC 2013 - pgajdos@suse.com Tue Apr 30 13:20:50 UTC 2013 - pgajdos@suse.com

View File

@ -52,6 +52,10 @@ Patch2: tiff-%{version}-tiff2pdf-colors.patch
Patch3: tiff-%{version}-CVE-2012-4564.patch Patch3: tiff-%{version}-CVE-2012-4564.patch
Patch4: tiff-%{version}-CVE-2013-1961.patch Patch4: tiff-%{version}-CVE-2013-1961.patch
Patch5: tiff-%{version}-CVE-2013-1960.patch Patch5: tiff-%{version}-CVE-2013-1960.patch
# http://bugzilla.maptools.org/show_bug.cgi?id=2443
Patch6: tiff-%{version}-double-free.patch
# http://bugzilla.maptools.org/show_bug.cgi?id=2442
Patch7: tiff-%{version}-compress-warning.patch
# FYI: this issue is solved another way # FYI: this issue is solved another way
# http://bugzilla.maptools.org/show_bug.cgi?id=1985#c1 # http://bugzilla.maptools.org/show_bug.cgi?id=1985#c1
# Patch9: tiff-%{version}-lzw-CVE-2009-2285.patch # Patch9: tiff-%{version}-lzw-CVE-2009-2285.patch
@ -101,6 +105,8 @@ the libtiff library.
%patch3 %patch3
%patch4 %patch4
%patch5 %patch5
%patch6
%patch7 -p1
%build %build
%configure --disable-static --with-pic %configure --disable-static --with-pic