diff --git a/0001-fixed-error-handling-for-broken-full-color-images.patch b/0001-fixed-error-handling-for-broken-full-color-images.patch new file mode 100644 index 0000000..baad7b0 --- /dev/null +++ b/0001-fixed-error-handling-for-broken-full-color-images.patch @@ -0,0 +1,38 @@ +From 796937043871aadbd0c0dc61bc90ea674ec1bc18 Mon Sep 17 00:00:00 2001 +From: Alex Tutubalin +Date: Fri, 24 May 2013 23:20:57 +0400 +Subject: [PATCH] fixed error handling for broken full-color images + +--- + src/external/LibRaw/src/libraw_cxx.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/external/LibRaw/src/libraw_cxx.cpp b/src/external/LibRaw/src/libraw_cxx.cpp +index 218460c..977e40a 100644 +--- a/src/external/LibRaw/src/libraw_cxx.cpp ++++ b/src/external/LibRaw/src/libraw_cxx.cpp +@@ -796,8 +796,8 @@ int LibRaw::unpack(void) + S.iheight= S.height; + IO.shrink = 0; + // allocate image as temporary buffer, size +- imgdata.rawdata.raw_alloc = calloc(S.iwidth*S.iheight,sizeof(*imgdata.image)); +- imgdata.image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; ++ imgdata.rawdata.raw_alloc = 0; ++ imgdata.image = (ushort (*)[4]) calloc(S.iwidth*S.iheight,sizeof(*imgdata.image)); + } + + +@@ -807,8 +807,8 @@ int LibRaw::unpack(void) + // recover saved + if( decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) + { +- imgdata.image = 0; +- imgdata.rawdata.color_image = (ushort (*)[4]) imgdata.rawdata.raw_alloc; ++ imgdata.rawdata.raw_alloc = imgdata.rawdata.color_image = imgdata.image; ++ imgdata.image = 0; + } + + // calculate channel maximum +-- +1.8.3 + diff --git a/darktable.changes b/darktable.changes index 8c83c4e..7d9c557 100644 --- a/darktable.changes +++ b/darktable.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 10 13:07:02 UTC 2013 - toganm@opensuse.org + +- added backported patch from git master + 0001-fixed-error-handling-for-broken-full-color-images.patch + fixes bnc#823114 + + ------------------------------------------------------------------- Sun May 26 12:24:17 UTC 2013 - toganm@opensuse.org diff --git a/darktable.spec b/darktable.spec index 0224659..27833bd 100644 --- a/darktable.spec +++ b/darktable.spec @@ -22,6 +22,8 @@ Release: 0 Url: http://darktable.sourceforge.net Source0: https://downloads.sourceforge.net/project/darktable/darktable/1.2/%name-%version.tar.xz Source1: http://sourceforge.net/projects/darktable/files/darktable/1.2/darktable-usermanual.pdf +#PATCH-FIX-UPSTREAM backported from git master bnc#823114 +Patch0: 0001-fixed-error-handling-for-broken-full-color-images.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: dbus-1-glib-devel @@ -87,6 +89,7 @@ This package provides the user manual in pdf format %prep %setup -q +%patch0 -p1 chmod -x tools/create_control_svg.sh tools/purge_non_existing_images.sh cp %{S:1} darktable-usermanual.pdf