[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libkdcraw] libraw: update internal Libraw to last 0.15.2
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2013-05-26 9:40:20
Message-ID: 20130526094020.39988A605B () git ! kde ! org
[Download RAW message or body]

Git commit 655c5ac08726eee4219d0a8830953a22d7f3d371 by Gilles Caulier.
Committed on 26/05/2013 at 11:39.
Pushed by cgilles into branch 'master'.

update internal Libraw to last 0.15.2
BUGS: 320049

M  +6    -0    libraw/Changelog.txt
M  +1    -1    libraw/internal/dcraw_common.cpp
M  +2    -2    libraw/libraw/libraw.h
M  +1    -1    libraw/libraw/libraw_version.h
M  +1    -1    libraw/src/libraw_c_api.cpp
M  +9    -3    libraw/src/libraw_cxx.cpp
M  +2    -2    libraw/src/libraw_datastream.cpp

http://commits.kde.org/libkdcraw/655c5ac08726eee4219d0a8830953a22d7f3d371

diff --git a/libraw/Changelog.txt b/libraw/Changelog.txt
index d305e9e..931d518 100644
--- a/libraw/Changelog.txt
+++ b/libraw/Changelog.txt
@@ -1,3 +1,9 @@
+2013-05-26 Alex Tutubalin <lexa@lexa.ru>
+  * Fixed possible double-free() on error recovery on damaged full-color
+    (Foveon, sRAW) files.
+  * wchar_t* file interface disabled for MinGW32 compilation
+  * LibRaw 0.15.2
+
 2013-05-25 Alex Tutubalin <lexa@lexa.ru>
   * fixed wrong data maximum calculation for Panasonic files
   * check for possible buffer overrun in exposure correction code
diff --git a/libraw/internal/dcraw_common.cpp b/libraw/internal/dcraw_common.cpp
index 293ba66..c56ece3 100644
--- a/libraw/internal/dcraw_common.cpp
+++ b/libraw/internal/dcraw_common.cpp
@@ -5690,7 +5690,7 @@ void CLASS parse_external_jpeg()
 #ifndef LIBRAW_LIBRARY_BUILD
   FILE *save=ifp;
 #else
-#ifdef WIN32
+#if defined (WIN32) && !defined(__MINGW32__)
   if(ifp->wfname())
   {
 	  std::wstring rawfile(ifp->wfname());
diff --git a/libraw/libraw/libraw.h b/libraw/libraw/libraw.h
index 057ee49..692af45 100644
--- a/libraw/libraw/libraw.h
+++ b/libraw/libraw/libraw.h
@@ -53,7 +53,7 @@ DllDef    const char          *libraw_strprogress(enum \
LibRaw_progress);  DllDef    libraw_data_t       *libraw_init(unsigned int flags);
 DllDef    int                 libraw_open_file(libraw_data_t*, const char *);
 DllDef    int                 libraw_open_file_ex(libraw_data_t*, const char *, \
                INT64 max_buff_sz);
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 DllDef    int                 libraw_open_wfile(libraw_data_t*, const wchar_t *);
 DllDef    int                 libraw_open_wfile_ex(libraw_data_t*, const wchar_t *, \
INT64 max_buff_sz);  #endif
@@ -103,7 +103,7 @@ class DllDef LibRaw
     LibRaw(unsigned int flags = LIBRAW_OPTIONS_NONE);
     libraw_output_params_t*     output_params_ptr() { return &imgdata.params;}
     int                         open_file(const char *fname, INT64 \
                max_buffered_sz=LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 	int                         open_file(const wchar_t *fname, INT64 \
max_buffered_sz=LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);  #endif
     int                         open_buffer(void *buffer, size_t size);
diff --git a/libraw/libraw/libraw_version.h b/libraw/libraw/libraw_version.h
index e413b8d..993f8d4 100644
--- a/libraw/libraw/libraw_version.h
+++ b/libraw/libraw/libraw_version.h
@@ -25,7 +25,7 @@ it under the terms of the one of three licenses as you choose:
 
 #define LIBRAW_MAJOR_VERSION  0
 #define LIBRAW_MINOR_VERSION  15
-#define LIBRAW_PATCH_VERSION  1
+#define LIBRAW_PATCH_VERSION  2
 #define LIBRAW_VERSION_TAIL   Release
 
 #define LIBRAW_SHLIB_CURRENT  	9
diff --git a/libraw/src/libraw_c_api.cpp b/libraw/src/libraw_c_api.cpp
index 8f575c9..14d467b 100644
--- a/libraw/src/libraw_c_api.cpp
+++ b/libraw/src/libraw_c_api.cpp
@@ -75,7 +75,7 @@ extern "C"
         LibRaw *ip = (LibRaw*) lr->parent_class;
         return ip->open_file(file,sz);
     }
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
     int libraw_open_wfile(libraw_data_t* lr, const wchar_t *file)
     {
         if(!lr) return EINVAL;
diff --git a/libraw/src/libraw_cxx.cpp b/libraw/src/libraw_cxx.cpp
index b4651f4..00e178d 100644
--- a/libraw/src/libraw_cxx.cpp
+++ b/libraw/src/libraw_cxx.cpp
@@ -773,7 +773,7 @@ int LibRaw::open_file(const char *fname, INT64 max_buf_size)
     return ret;
 }
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 int LibRaw::open_file(const wchar_t *fname, INT64 max_buf_size)
 {
 	struct _stati64 st;
@@ -1144,8 +1144,8 @@ int LibRaw::unpack(void)
                 IO.shrink = 0;
 				S.raw_pitch = S.width*8;
                 // 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));  }
             ID.input->seek(libraw_internal_data.unpacker_data.data_offset, \
SEEK_SET);  
@@ -1155,6 +1155,12 @@ int LibRaw::unpack(void)
             (this->*load_raw)();
 			if(load_raw == &LibRaw::unpacked_load_raw && \
!strcasecmp(imgdata.idata.make,"Nikon"))  C.maximum = m_save;
+			if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY)
+			{
+				// successfully decoded legacy image, attach image to raw_alloc
+				imgdata.rawdata.raw_alloc = imgdata.image;
+				imgdata.image = 0; 
+			}
           }
 
         if(imgdata.rawdata.raw_image)
diff --git a/libraw/src/libraw_datastream.cpp b/libraw/src/libraw_datastream.cpp
index 8a2bf94..f09623c 100755
--- a/libraw/src/libraw_datastream.cpp
+++ b/libraw/src/libraw_datastream.cpp
@@ -274,7 +274,7 @@ void * LibRaw_file_datastream::make_jas_stream()
 #ifdef NO_JASPER
     return NULL;
 #else
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 	if(wfname())
 	{
 		jas_file = _wfopen(wfname(),L"rb");
@@ -294,7 +294,7 @@ int LibRaw_file_datastream::jpeg_src(void *jpegdata)
   return -1; // not supported
 #else
   if(jas_file) { fclose(jas_file); jas_file = NULL;}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
   if(wfname())
     {
       jas_file = _wfopen(wfname(),L"rb");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic