[libjpeg-turbo] Handle broken JPEGs better (#688712).

Adam Tkac atkac at fedoraproject.org
Tue Mar 22 14:07:21 UTC 2011


commit 98649557e313eea12f0e9eb3afb287dda6433838
Author: Adam Tkac <atkac at redhat.com>
Date:   Tue Mar 22 15:07:02 2011 +0100

    Handle broken JPEGs better (#688712).
    
    Signed-off-by: Adam Tkac <atkac at redhat.com>

 libjpeg-turbo.spec   |    7 ++++++-
 ljt11-rh688712.patch |   24 ++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec
index 650cbe1..a589470 100644
--- a/libjpeg-turbo.spec
+++ b/libjpeg-turbo.spec
@@ -1,6 +1,6 @@
 Name:		libjpeg-turbo
 Version:	1.1.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	A MMX/SSE2 accelerated library for manipulating JPEG image files
 
 Group:		System Environment/Libraries
@@ -22,6 +22,7 @@ Obsoletes:	libjpeg < 6b-47
 Provides:	libjpeg = 6b-47
 
 Patch0:		libjpeg-turbo11-noinst_jpgtest.patch
+Patch1:		ljt11-rh688712.patch
 
 %description
 The libjpeg-turbo package contains a library of functions for manipulating
@@ -73,6 +74,7 @@ JPEG images
 %setup -q
 
 %patch0 -p1 -b .noinst_jpgtest
+%patch1 -p0 -b .rh688712
 
 %build
 autoreconf -fiv
@@ -135,6 +137,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libjpeg.a
 
 %changelog
+* Tue Mar 22 2011 Adam Tkac <atkac redhat com> 1.1.0-2
+- handle broken JPEGs better (#688712)
+
 * Tue Mar 01 2011 Adam Tkac <atkac redhat com> 1.1.0-1
 - update to 1.1.0
 
diff --git a/ljt11-rh688712.patch b/ljt11-rh688712.patch
new file mode 100644
index 0000000..35a27d3
--- /dev/null
+++ b/ljt11-rh688712.patch
@@ -0,0 +1,24 @@
+Index: jdhuff.c
+===================================================================
+--- jdhuff.c	(revision 520)
++++ jdhuff.c	(revision 521)
+@@ -623,6 +623,7 @@
+   if (val0 == 0xFF) {                                   \
+     buffer++;                                           \
+     if (val1 != 0) {                                    \
++      cinfo->unread_marker = val1;                      \
+       buffer   -= 2;                                    \
+       get_buffer      &= ~0xFF;                         \
+     }                                                   \
+@@ -739,6 +740,11 @@
+     }
+   }
+ 
++  if (cinfo->unread_marker != 0 && ! cinfo->entropy->insufficient_data) {
++    WARNMS(cinfo, JWRN_HIT_MARKER);
++    cinfo->entropy->insufficient_data = TRUE;
++  }
++
+   br_state.bytes_in_buffer -= (buffer - br_state.next_input_byte);
+   br_state.next_input_byte = buffer;
+   BITREAD_SAVE_STATE(cinfo,entropy->bitstate);


More information about the scm-commits mailing list