diff --git a/SOURCES/mozilla-1819244.patch b/SOURCES/mozilla-1819244.patch new file mode 100644 index 0000000..530284a --- /dev/null +++ b/SOURCES/mozilla-1819244.patch @@ -0,0 +1,23 @@ +diff -up libwebp-0.3.0/src/enc/alpha.c.mozilla-1819244 libwebp-0.3.0/src/enc/alpha.c +--- libwebp-0.3.0/src/enc/alpha.c.mozilla-1819244 2013-03-29 23:55:16.000000000 +0100 ++++ libwebp-0.3.0/src/enc/alpha.c 2023-04-26 12:06:31.017969727 +0200 +@@ -123,8 +123,8 @@ static int EncodeAlphaInternal(const uin + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(bw, expected_size); +- VP8BitWriterAppend(bw, &header, ALPHA_HEADER_LEN); ++ ok = VP8BitWriterInit(bw, expected_size); ++ ok = ok && VP8BitWriterAppend(bw, &header, ALPHA_HEADER_LEN); + + filter_func = WebPFilters[filter]; + if (filter_func != NULL) { +@@ -135,7 +135,7 @@ static int EncodeAlphaInternal(const uin + } + + if (method == ALPHA_NO_COMPRESSION) { +- ok = VP8BitWriterAppend(bw, alpha_src, width * height); ++ ok = ok && VP8BitWriterAppend(bw, alpha_src, width * height); + ok = ok && !bw->error_; + } else { + ok = EncodeLossless(alpha_src, width, height, effort_level, bw, stats); diff --git a/SPECS/libwebp.spec b/SPECS/libwebp.spec index 45e8526..26a2500 100644 --- a/SPECS/libwebp.spec +++ b/SPECS/libwebp.spec @@ -1,7 +1,7 @@ %global _hardened_build 1 Name: libwebp Version: 0.3.0 -Release: 10%{?dist} +Release: 11%{?dist} Group: Development/Libraries URL: http://webmproject.org/ Summary: Library and tools for the WebP graphics format @@ -14,6 +14,7 @@ Patch1: libwebp-0.3.0-endian-check2.patch Patch2: rhbz-1956829.patch Patch3: rhbz-1956843.patch Patch4: rhbz-1956919.patch +Patch5: mozilla-1819244.patch BuildRequires: libjpeg-devel libpng-devel libtool swig BuildRequires: giflib-devel BuildRequires: libtiff-devel @@ -68,6 +69,7 @@ Java bindings for libwebp. %patch2 -p1 -b .rhbz-1956829 %patch3 -p1 -b .rhbz-1956843 %patch4 -p1 -b .rhbz-1956919 +%patch5 -p1 -b .mozilla-1819244 %build mkdir -p m4 @@ -131,6 +133,9 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/ %changelog +* Wed Apr 26 2023 Martin Stransky - 0.3.0-11 +- Added fix for mzbz#1819244 + * Mon May 17 2021 Martin Stransky - 0.3.0-10 - Added fixes for rhbz#1956829, rhbz#1956843, rhbz#1956919