This commit is contained in:
Alexander Stefanov 2021-04-25 15:15:23 +00:00
parent eaf9340593
commit c4ad178844
4 changed files with 3 additions and 58 deletions

View file

@ -1,2 +1,2 @@
sources:
libjpeg-turbo-2.0.6.tar.gz: 5406c7676d7df89fb4da791ad5af51202910fb25
libjpeg-turbo-2.1.0.tar.gz: 6bf63c869105d341011cd4915816de888338231a

View file

@ -1,40 +0,0 @@
diff -rupN libjpeg-turbo-2.0.0.old/jdpostct.c libjpeg-turbo-2.0.0/jdpostct.c
--- libjpeg-turbo-2.0.0.old/jdpostct.c 2018-07-27 18:47:48.000000000 +0200
+++ libjpeg-turbo-2.0.0/jdpostct.c 2018-08-01 16:10:01.647692751 +0200
@@ -137,6 +137,11 @@ post_process_1pass(j_decompress_ptr cinf
my_post_ptr post = (my_post_ptr)cinfo->post;
JDIMENSION num_rows, max_rows;
+ /* read_and_discard_scanlines may call it with rows "available", but no buffer */
+ if (output_buf == NULL) {
+ return;
+ }
+
/* Fill the buffer, but not more than what we can dump out in one go. */
/* Note we rely on the upsampler to detect bottom of image. */
max_rows = out_rows_avail - *out_row_ctr;
diff -rupN libjpeg-turbo-2.0.0.old/jerror.h libjpeg-turbo-2.0.0/jerror.h
--- libjpeg-turbo-2.0.0.old/jerror.h 2018-07-27 18:47:48.000000000 +0200
+++ libjpeg-turbo-2.0.0/jerror.h 2018-08-01 16:11:31.554054434 +0200
@@ -207,6 +207,7 @@ JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt J
#endif
#endif
JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker")
+JMESSAGE(JERR_BAD_PARAM, "Bogus parameter")
#ifdef JMAKE_ENUM_LIST
diff -rupN libjpeg-turbo-2.0.0.old/jquant1.c libjpeg-turbo-2.0.0/jquant1.c
--- libjpeg-turbo-2.0.0.old/jquant1.c 2018-07-27 18:47:48.000000000 +0200
+++ libjpeg-turbo-2.0.0/jquant1.c 2018-08-01 16:12:44.437913930 +0200
@@ -532,6 +532,10 @@ quantize_ord_dither(j_decompress_ptr cin
JDIMENSION col;
JDIMENSION width = cinfo->output_width;
+ if (output_buf == NULL && num_rows) {
+ ERREXIT(cinfo, JERR_BAD_PARAM);
+ }
+
for (row = 0; row < num_rows; row++) {
/* Initialize output values to 0 so can process components separately */
jzero_far((void *)output_buf[row], (size_t)(width * sizeof(JSAMPLE)));

View file

@ -1,12 +0,0 @@
diff -rupN libjpeg-turbo-2.0.0.old/CMakeLists.txt libjpeg-turbo-2.0.0/CMakeLists.txt
--- libjpeg-turbo-2.0.0.old/CMakeLists.txt 2018-07-27 18:47:48.000000000 +0200
+++ libjpeg-turbo-2.0.0/CMakeLists.txt 2018-08-01 16:24:47.625312813 +0200
@@ -102,7 +102,7 @@ if(CMAKE_INSTALL_PREFIX STREQUAL "${CMAK
if(BITS EQUAL 64)
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib64")
else()
- set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib32")
+ set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib")
endif()
endif()
endif()

View file

@ -12,7 +12,7 @@
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files
Name: libjpeg-turbo
Epoch: 1
Version: 2.0.6
Version: 2.1.0
Release: 1
License: wxWindows Library License
Group: System/Libraries
@ -25,8 +25,6 @@ Source0: https://sourceforge.net/projects/libjpeg-turbo/files/%{version}/%{name}
Source2: http://jpegclub.org/jpegexiforient.c
Source3: http://jpegclub.org/exifautotran.txt
Patch0: jpeg-6b-c++fixes.patch
Patch1: libjpeg-turbo-2.0.0-CVE-2017-15232.patch
Patch2: libjpeg-turbo-2.0.0-fix-lib-path.patch
BuildRequires: cmake
BuildRequires: libtool >= 1.4
%ifarch %{ix86} x86_64
@ -107,6 +105,7 @@ library.
%{_includedir}/*.h
%{_libdir}/pkgconfig/libjpeg.pc
%{_libdir}/pkgconfig/libturbojpeg.pc
%{_libdir}/cmake/%{name}/*.cmake
#----------------------------------------------------------------------------
@ -160,8 +159,6 @@ have orientation markings in the EXIF data.
%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1
cp %{SOURCE2} jpegexiforient.c
cp %{SOURCE3} exifautotran