9e24dd790b
- added backported patch from git master 0001-fixed-error-handling-for-broken-full-color-images.patch fixes bnc#823114 (forwarded request 178387 from toganm) OBS-URL: https://build.opensuse.org/request/show/178389 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/darktable?expand=0&rev=31
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From 796937043871aadbd0c0dc61bc90ea674ec1bc18 Mon Sep 17 00:00:00 2001
|
|
From: Alex Tutubalin <lexa@lexa.ru>
|
|
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
|
|
|