Apply partial fix for bug #460322
This commit is contained in:
parent
cf546e81e3
commit
be477ef7c4
43
libtiff-jpeg-scanline.patch
Normal file
43
libtiff-jpeg-scanline.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Upstream patch that partially fixes bug #460322. The tiffcmp case is
|
||||||
|
still there, but this is a step forward anyhow, so going with it for now.
|
||||||
|
|
||||||
|
|
||||||
|
diff -Naur 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-08-30 12:21:46.000000000 -0400
|
||||||
|
+++ tiff-3.9.2/libtiff/tif_jpeg.c 2009-12-05 16:48:56.000000000 -0500
|
||||||
|
@@ -1613,7 +1613,11 @@
|
||||||
|
* Must recalculate cached tile size in case sampling state changed.
|
||||||
|
* Should we really be doing this now if image size isn't set?
|
||||||
|
*/
|
||||||
|
- tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
|
||||||
|
+ if( tif->tif_tilesize > 0 )
|
||||||
|
+ tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
|
||||||
|
+
|
||||||
|
+ if(tif->tif_scanlinesize > 0 )
|
||||||
|
+ tif->tif_scanlinesize = TIFFScanlineSize(tif);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
@@ -1741,13 +1745,21 @@
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- {
|
||||||
|
+ {
|
||||||
|
if( !TIFFFillStrip( tif, 0 ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
||||||
|
(uint16) sp->h_sampling, (uint16) sp->v_sampling );
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ ** We want to clear the loaded strip so the application has time
|
||||||
|
+ ** to set JPEGCOLORMODE or other behavior modifiers. This essentially
|
||||||
|
+ ** undoes the JPEGPreDecode triggers by TIFFFileStrip(). (#1936)
|
||||||
|
+ */
|
||||||
|
+ tif->tif_curstrip = -1;
|
||||||
|
+
|
||||||
|
#endif /* CHECK_JPEG_YCBCR_SUBSAMPLING */
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Library of functions for manipulating TIFF format image files
|
Summary: Library of functions for manipulating TIFF format image files
|
||||||
Name: libtiff
|
Name: libtiff
|
||||||
Version: 3.9.2
|
Version: 3.9.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
|
||||||
License: libtiff
|
License: libtiff
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -11,6 +11,7 @@ Source: ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{version}.tar.gz
|
|||||||
Patch1: libtiff-acversion.patch
|
Patch1: libtiff-acversion.patch
|
||||||
Patch2: libtiff-mantypo.patch
|
Patch2: libtiff-mantypo.patch
|
||||||
Patch3: libtiff-CVE-2009-2347.patch
|
Patch3: libtiff-CVE-2009-2347.patch
|
||||||
|
Patch4: libtiff-jpeg-scanline.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
BuildRequires: zlib-devel libjpeg-devel
|
BuildRequires: zlib-devel libjpeg-devel
|
||||||
@ -66,6 +67,7 @@ image files using the libtiff library.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
# Use build system's libtool.m4, not the one in the package.
|
# Use build system's libtool.m4, not the one in the package.
|
||||||
rm -f libtool.m4
|
rm -f libtool.m4
|
||||||
@ -177,6 +179,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 16 2009 Tom Lane <tgl@redhat.com> 3.9.2-2
|
||||||
|
- Apply Warmerdam's partial fix for bug #460322 ... better than nothing.
|
||||||
|
Related: #460322
|
||||||
|
|
||||||
* Thu Dec 3 2009 Tom Lane <tgl@redhat.com> 3.9.2-1
|
* Thu Dec 3 2009 Tom Lane <tgl@redhat.com> 3.9.2-1
|
||||||
- Update to libtiff 3.9.2; stop carrying a lot of old patches
|
- Update to libtiff 3.9.2; stop carrying a lot of old patches
|
||||||
Resolves: #520734
|
Resolves: #520734
|
||||||
|
Loading…
Reference in New Issue
Block a user