add bigendian patch to fix raw_decode self check failure on ppc*, s390*
This commit is contained in:
parent
396b449b01
commit
5f9a7dda1b
15
libtiff-4.0.2-bigendian.patch
Normal file
15
libtiff-4.0.2-bigendian.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up tiff-4.0.2/test/raw_decode.c.bigendian tiff-4.0.2/test/raw_decode.c
|
||||
--- tiff-4.0.2/test/raw_decode.c.bigendian 2012-07-03 15:27:37.168543695 +0200
|
||||
+++ tiff-4.0.2/test/raw_decode.c 2012-07-03 15:28:47.795051599 +0200
|
||||
@@ -85,9 +85,9 @@ static int check_rgb_pixel( int pixel, i
|
||||
static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, unsigned char *buffer ) {
|
||||
/* RGBA images are upside down - adjust for normal ordering */
|
||||
int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
|
||||
- unsigned char *rgba = buffer + 4 * adjusted_pixel;
|
||||
+ unsigned int *rgba = (unsigned int*)(buffer + 4 * adjusted_pixel);
|
||||
|
||||
- if( rgba[0] == red && rgba[1] == green && rgba[2] == blue && rgba[3] == alpha ) {
|
||||
+ if( TIFFGetR(*rgba) == red && TIFFGetG(*rgba) == green && TIFFGetB(*rgba) == blue && TIFFGetA(*rgba) == alpha ) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Library of functions for manipulating TIFF format image files
|
||||
Name: libtiff
|
||||
Version: 4.0.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
License: libtiff
|
||||
Group: System Environment/Libraries
|
||||
@ -22,6 +22,7 @@ Source1: ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{prevversion}.tar.gz
|
||||
Patch2: libtiff-CVE-2012-1173-3.9.patch
|
||||
Patch3: libtiff-CVE-2012-2088.patch
|
||||
Patch4: libtiff-CVE-2012-2113.patch
|
||||
Patch5: libtiff-4.0.2-bigendian.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
BuildRequires: zlib-devel libjpeg-devel jbigkit-devel
|
||||
@ -103,6 +104,7 @@ autoheader
|
||||
autoconf
|
||||
autoheader
|
||||
popd
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
@ -233,6 +235,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/libtiffxx.so.3*
|
||||
|
||||
%changelog
|
||||
* Tue Jul 03 2012 Karsten Hopp <karsten@redhat.com> 4.0.2-2
|
||||
- add opensuse bigendian patch to fix raw_decode self check failure on ppc*, s390*
|
||||
|
||||
* Thu Jun 28 2012 Tom Lane <tgl@redhat.com> 4.0.2-1
|
||||
- Update to libtiff 4.0.2, includes fix for CVE-2012-2113
|
||||
(note that CVE-2012-2088 does not apply to 4.0.x)
|
||||
|
Loading…
Reference in New Issue
Block a user