From 197c7d72fe6b8c93501d13626092f62354043e49092e2fbfb92006aad071f42f Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 10 Jan 2019 10:59:36 +0000 Subject: [PATCH] - supplementary fix for https://github.com/LibRaw/LibRaw/issues/195 + libraw-half-size-allocation-buffer-overflow.patch OBS-URL: https://build.opensuse.org/package/show/graphics/libraw?expand=0&rev=130 --- ...half-size-allocation-buffer-overflow.patch | 22 +++++++++++++++++++ libraw.changes | 6 +++++ libraw.spec | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 libraw-half-size-allocation-buffer-overflow.patch diff --git a/libraw-half-size-allocation-buffer-overflow.patch b/libraw-half-size-allocation-buffer-overflow.patch new file mode 100644 index 0000000..bb40d11 --- /dev/null +++ b/libraw-half-size-allocation-buffer-overflow.patch @@ -0,0 +1,22 @@ +diff --git a/internal/dcraw_common.cpp b/internal/dcraw_common.cpp +index a0cd7226..6d1376f6 100644 +--- a/internal/dcraw_common.cpp ++++ b/internal/dcraw_common.cpp +@@ -18997,10 +18997,15 @@ void CLASS identify() + { + if (!load_raw) + load_raw = &CLASS unpacked_load_raw; +- if (is_raw > 1 && !shot_select && !half_size) ++ if (is_raw > 1 && !shot_select) + filters = 0; + maximum = 0x3fff; + } ++ else if(load_raw == &LibRaw::sinar_4shot_load_raw) ++ { ++ if (is_raw > 1 && !shot_select) ++ filters = 0; ++ } + else if (!strncmp(make, "Leaf", 4)) + { + maximum = 0x3fff; + diff --git a/libraw.changes b/libraw.changes index 5de9a9c..750e52d 100644 --- a/libraw.changes +++ b/libraw.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 10 10:57:32 UTC 2019 - Petr Gajdos + +- supplementary fix for https://github.com/LibRaw/LibRaw/issues/195 + + libraw-half-size-allocation-buffer-overflow.patch + ------------------------------------------------------------------- Tue Jan 8 13:22:31 UTC 2019 - Petr Gajdos diff --git a/libraw.spec b/libraw.spec index 6fae091..10ea755 100644 --- a/libraw.spec +++ b/libraw.spec @@ -32,6 +32,7 @@ Url: https://www.libraw.org/ #Git-Clone: git://github.com/LibRaw/LibRaw Source: https://www.libraw.org/data/%tar_name-%version.tar.gz Patch1: libraw-Add-Sony-ILCE-7M3.patch +Patch2: libraw-half-size-allocation-buffer-overflow.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: fdupes @@ -103,6 +104,7 @@ against LibRaw. LibRaw does not provide dynamic libraries. %prep %setup -q -n %{tar_name}-%{version} %patch1 -p1 +%patch2 -p1 %build export CXXFLAGS="%{optflags} -fPIC -DUSE_ZLIB"