Accepting request 822595 from home:polslinux:branches:graphics

- version update to 0.20.0
  * Camera Format support
    + Canon CR3
    + GoPro (via GPR SDK)
    + Panasonic 14-bit
    + Fujifilm compressed/16bit
    + Rapsberry Pi RAW+JPEG format (if USE_6BY9RPI defined)
  * Camera support (+59, 1131 total)
    + Canon: PowerShot G5 X Mark II, G7 X Mark III, SX70 HS,
    + EOS R, EOS RP, EOS 90D, EOS 250D,  EOS M6 Mark II, EOS M50, EOS M200
    + EOS 1DX Mark III (lossless files only)
    + DJI Mavic Air, Osmo Action
    + FujiFilm GFX 100, X-A7, X-Pro3, X100V,
      X-T4 (uncompressed/lossless compressed only), X-T200
    + GoPro Fusion, HERO5, HERO6, HERO7, HERO8
    + Hasselblad L1D-20c, X1D II 50C
    + Leica D-LUX7, Q-P, Q2, V-LUX5, C-Lux / CAM-DC25, SL2, M10 Monochrom
    + Nikon D780, Z50, P950
    + Olympus TG-6, E-M5 Mark III, E-PL10, E-M1 Mark III,
    + Panasonic DC-FZ1000 II, DC-G90, DC-S1, DC-S1R, DC-S1H, DC-TZ95
    + PhaseOne IQ4 150MP
    + Ricoh GR III
    + Sony A7R IV, A9 II, ILCE-6100, ILCE-6600, RX0 II, RX100 VII
    + Zenit M
  * minor/unsorted changes
    + Add support for zlib during configure
    + Fixed multiple problems found by OSS-Fuzz
    + Lots of changes in imgdata.makernotes
    + DNG whitelevel calculated via BitsPerSample if not set via tags
    + DNG: support for LinearDNG w/ BlackLevelRepeat.. pattern
    + better support for Nikon Coolscan 16-bit NEF files
    + Bayer images: ensure that even margins have the same COLOR()
      for both the active sensor area and the full sensor area.
    + fixed several bugs
- removed libraw-Add-Sony-ILCE-7M3.patch
- removed libraw-CVE-2020-15503.patch

OBS-URL: https://build.opensuse.org/request/show/822595
OBS-URL: https://build.opensuse.org/package/show/graphics/libraw?expand=0&rev=139
This commit is contained in:
Dirk Stoecker 2020-08-03 12:38:49 +00:00 committed by Git OBS Bridge
parent ab9161749c
commit ce7f7845b0
6 changed files with 45 additions and 207 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40a262d7cc71702711a0faec106118ee004f86c86cc228281d12d16da03e02f5
size 1303806

3
LibRaw-0.20.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f0a383da2ce9f409087facd28261decbf6be72cc90c78cd003b0766e4d694a3
size 1431412

View File

@ -1,64 +0,0 @@
From a340f3d299f73b2ae25678f7b59fc2167d7c6fc1 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Fri, 4 May 2018 10:50:10 +0200
Subject: [PATCH] Add Sony ILCE-7M3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
---
dcraw/dcraw.c | 11 +++++++----
internal/dcraw_common.cpp | 11 +++++++----
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/internal/dcraw_common.cpp b/internal/dcraw_common.cpp
index 0a9afa2..80b91c4 100644
--- a/internal/dcraw_common.cpp
+++ b/internal/dcraw_common.cpp
@@ -8331,7 +8331,7 @@ void CLASS setSonyBodyFeatures(unsigned id)
{360, LIBRAW_FORMAT_APSC, LIBRAW_MOUNT_Sony_E, LIBRAW_SONY_ILCE, 0, 8, 0x0346, 0x01cd},
{361, 0, 0, 0, 0, 0, 0xffff, 0xffff},
{362, LIBRAW_FORMAT_FF, LIBRAW_MOUNT_Sony_E, LIBRAW_SONY_ILCE, 0, 9, 0x0320, 0x019f},
- {363, 0, 0, 0, 0, 0, 0xffff, 0xffff},
+ {363, LIBRAW_FORMAT_FF, LIBRAW_MOUNT_Sony_E, LIBRAW_SONY_ILCE, 0, 0, 0x0320, 0x019f},
{364, LIBRAW_FORMAT_1INCH, LIBRAW_MOUNT_FixedLens, LIBRAW_SONY_DSC, LIBRAW_MOUNT_FixedLens, 8, 0x0346, 0xffff},
{365, LIBRAW_FORMAT_1INCH, LIBRAW_MOUNT_FixedLens, LIBRAW_SONY_DSC, LIBRAW_MOUNT_FixedLens, 9, 0x0320, 0xffff},
};
@@ -8623,7 +8623,7 @@ void CLASS process_Sony_0x9050(uchar *buf, ushort len, unsigned id)
parseSonyLensFeatures(SonySubstitution[buf[0x116]], SonySubstitution[buf[0x117]]);
}
- if ((id == 347) || (id == 350) || (id == 354) || (id == 357) || (id == 358) || (id == 360) || (id == 362))
+ if ((id == 347) || (id == 350) || (id == 354) || (id == 357) || (id == 358) || (id == 360) || (id == 362) || (id == 363))
{
if (len <= 0x8d)
return;
@@ -8687,7 +8687,7 @@ void CLASS process_Sony_0x9400(uchar *buf, ushort len, unsigned id)
if (((bufx == 0x23) || (bufx == 0x24) || (bufx == 0x26)) && (len >= 0x1f))
{ // 0x9400 'c' version
- if ((id == 358) || (id == 362) || (id == 365))
+ if ((id == 358) || (id == 362) || (id == 363) || (id == 365))
{
imgdata.makernotes.sony.ShotNumberSincePowerUp = SonySubstitution[buf[0x0a]];
}
@@ -17094,6 +17094,8 @@ void CLASS adobe_coeff(const char *t_make, const char *t_model
{ 6389,-1703,-378,-4562,12265,2587,-670,1489,6550 } },
{ "Sony ILCE-7M2", 0, 0,
{ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } },
+ { "Sony ILCE-7M3", 0, 0,
+ { 7374,-2389,-551,-5435,13162,2519,-1006,1795,6552 } },
{ "Sony ILCE-7SM2", 0, 0,
{ 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } },
{ "Sony ILCE-7S", 0, 0,
@@ -17472,7 +17474,8 @@ void CLASS identify()
{0x155, "DSC-RX100M4"}, {0x156, "DSC-RX10M2"}, {0x158, "DSC-RX1RM2"}, {0x15a, "ILCE-QX1"},
{0x15b, "ILCE-7RM2"}, {0x15e, "ILCE-7SM2"}, {0x161, "ILCA-68"}, {0x162, "ILCA-99M2"},
{0x163, "DSC-RX10M3"}, {0x164, "DSC-RX100M5"}, {0x165, "ILCE-6300"}, {0x166, "ILCE-9"},
- {0x168, "ILCE-6500"}, {0x16a, "ILCE-7RM3"}, {0x16c, "DSC-RX0"}, {0x16d, "DSC-RX10M4"},
+ {0x168, "ILCE-6500"}, {0x16a, "ILCE-7RM3"}, {0x16b, "ILCE-7M3"}, {0x16c, "DSC-RX0"},
+ {0x16d, "DSC-RX10M4"},
};
#ifdef LIBRAW_LIBRARY_BUILD
--
2.16.3

View File

@ -1,133 +0,0 @@
Index: LibRaw-0.19.5/libraw/libraw_const.h
===================================================================
--- LibRaw-0.19.5.orig/libraw/libraw_const.h 2020-07-07 12:42:30.310654582 +0200
+++ LibRaw-0.19.5/libraw/libraw_const.h 2020-07-07 12:49:43.141162263 +0200
@@ -24,6 +24,11 @@ it under the terms of the one of two lic
#define LIBRAW_MAX_ALLOC_MB 2048L
#endif
+/* limit thumbnail size, default is 512Mb*/
+#ifndef LIBRAW_MAX_THUMBNAIL_MB
+#define LIBRAW_MAX_THUMBNAIL_MB 512L
+#endif
+
/* Change to non-zero to allow (broken) CRW (and other) files metadata
loop prevention */
#ifndef LIBRAW_METADATA_LOOP_PREVENTION
Index: LibRaw-0.19.5/src/libraw_cxx.cpp
===================================================================
--- LibRaw-0.19.5.orig/src/libraw_cxx.cpp 2019-08-20 19:34:30.000000000 +0200
+++ LibRaw-0.19.5/src/libraw_cxx.cpp 2020-07-07 13:03:23.697916270 +0200
@@ -3712,6 +3712,20 @@ libraw_processed_image_t *LibRaw::dcraw_
return NULL;
}
+ if (T.tlength < 64u)
+ {
+ if (errcode)
+ *errcode = EINVAL;
+ return NULL;
+ }
+
+ if (INT64(T.tlength) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB)
+ {
+ if (errcode)
+ *errcode = LIBRAW_TOO_BIG;
+ return NULL;
+ }
+
if (T.tformat == LIBRAW_THUMBNAIL_BITMAP)
{
libraw_processed_image_t *ret = (libraw_processed_image_t *)::malloc(sizeof(libraw_processed_image_t) + T.tlength);
@@ -3976,6 +3990,12 @@ void LibRaw::kodak_thumb_loader()
if (ID.toffset + est_datasize > ID.input->size() + THUMB_READ_BEYOND)
throw LIBRAW_EXCEPTION_IO_EOF;
+ if(INT64(T.theight) * INT64(T.twidth) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB)
+ throw LIBRAW_EXCEPTION_IO_CORRUPT;
+
+ if (INT64(T.theight) * INT64(T.twidth) < 64ULL)
+ throw LIBRAW_EXCEPTION_IO_CORRUPT;
+
// some kodak cameras
ushort s_height = S.height, s_width = S.width, s_iwidth = S.iwidth, s_iheight = S.iheight;
ushort s_flags = libraw_internal_data.unpacker_data.load_flags;
@@ -4237,6 +4257,25 @@ int LibRaw::unpack_thumb(void)
CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY);
CHECK_ORDER_BIT(LIBRAW_PROGRESS_THUMB_LOAD);
+#define THUMB_SIZE_CHECKT(A) \
+ do { \
+ if (INT64(A) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ if (INT64(A) > 0 && INT64(A) < 64ULL) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ } while (0)
+
+#define THUMB_SIZE_CHECKTNZ(A) \
+ do { \
+ if (INT64(A) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ if (INT64(A) < 64ULL) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ } while (0)
+
+
+#define THUMB_SIZE_CHECKWH(W,H) \
+ do { \
+ if (INT64(W)*INT64(H) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ if (INT64(W)*INT64(H) < 64ULL) throw LIBRAW_EXCEPTION_IO_CORRUPT; \
+ } while (0)
+
try
{
if (!libraw_internal_data.internal_data.input)
@@ -4267,6 +4306,7 @@ int LibRaw::unpack_thumb(void)
if (INT64(ID.toffset) + tsize > ID.input->size() + THUMB_READ_BEYOND)
throw LIBRAW_EXCEPTION_IO_EOF;
+ THUMB_SIZE_CHECKT(tsize);
}
else
{
@@ -4280,6 +4320,8 @@ int LibRaw::unpack_thumb(void)
ID.input->seek(ID.toffset, SEEK_SET);
if (write_thumb == &LibRaw::jpeg_thumb)
{
+ THUMB_SIZE_CHECKTNZ(T.tlength);
+
if (T.thumb)
free(T.thumb);
T.thumb = (char *)malloc(T.tlength);
@@ -4326,6 +4368,7 @@ int LibRaw::unpack_thumb(void)
{
if (t_bytesps > 1)
throw LIBRAW_EXCEPTION_IO_CORRUPT; // 8-bit thumb, but parsed for more bits
+ THUMB_SIZE_CHECKWH(T.twidth, T.theight);
int t_length = T.twidth * T.theight * t_colors;
if (T.tlength && T.tlength < t_length) // try to find tiff ifd with needed offset
@@ -4351,6 +4394,7 @@ int LibRaw::unpack_thumb(void)
T.tcolors = 1;
}
T.tlength = total_size;
+ THUMB_SIZE_CHECKTNZ(T.tlength);
if (T.thumb)
free(T.thumb);
T.thumb = (char *)malloc(T.tlength);
@@ -4384,6 +4428,8 @@ int LibRaw::unpack_thumb(void)
if (T.thumb)
free(T.thumb);
+ THUMB_SIZE_CHECKTNZ(T.tlength);
+
T.thumb = (char *)malloc(T.tlength);
if (!T.tcolors)
T.tcolors = t_colors;
@@ -4404,6 +4450,10 @@ int LibRaw::unpack_thumb(void)
int i_length = T.twidth * T.theight * t_colors * 2;
if (!T.tlength)
T.tlength = o_length;
+ THUMB_SIZE_CHECKTNZ(o_length);
+ THUMB_SIZE_CHECKTNZ(i_length);
+ THUMB_SIZE_CHECKTNZ(T.tlength);
+
ushort *t_thumb = (ushort *)calloc(i_length, 1);
ID.input->read(t_thumb, 1, i_length);
if ((libraw_internal_data.unpacker_data.order == 0x4949) == (ntohs(0x1234) == 0x1234))

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Fri Jul 24 08:58:33 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
- version update to 0.20.0
* Camera Format support
+ Canon CR3
+ GoPro (via GPR SDK)
+ Panasonic 14-bit
+ Fujifilm compressed/16bit
+ Rapsberry Pi RAW+JPEG format (if USE_6BY9RPI defined)
* Camera support (+59, 1131 total)
+ Canon: PowerShot G5 X Mark II, G7 X Mark III, SX70 HS,
+ EOS R, EOS RP, EOS 90D, EOS 250D, EOS M6 Mark II, EOS M50, EOS M200
+ EOS 1DX Mark III (lossless files only)
+ DJI Mavic Air, Osmo Action
+ FujiFilm GFX 100, X-A7, X-Pro3, X100V,
X-T4 (uncompressed/lossless compressed only), X-T200
+ GoPro Fusion, HERO5, HERO6, HERO7, HERO8
+ Hasselblad L1D-20c, X1D II 50C
+ Leica D-LUX7, Q-P, Q2, V-LUX5, C-Lux / CAM-DC25, SL2, M10 Monochrom
+ Nikon D780, Z50, P950
+ Olympus TG-6, E-M5 Mark III, E-PL10, E-M1 Mark III,
+ Panasonic DC-FZ1000 II, DC-G90, DC-S1, DC-S1R, DC-S1H, DC-TZ95
+ PhaseOne IQ4 150MP
+ Ricoh GR III
+ Sony A7R IV, A9 II, ILCE-6100, ILCE-6600, RX0 II, RX100 VII
+ Zenit M
* minor/unsorted changes
+ Add support for zlib during configure
+ Fixed multiple problems found by OSS-Fuzz
+ Lots of changes in imgdata.makernotes
+ DNG whitelevel calculated via BitsPerSample if not set via tags
+ DNG: support for LinearDNG w/ BlackLevelRepeat.. pattern
+ better support for Nikon Coolscan 16-bit NEF files
+ Bayer images: ensure that even margins have the same COLOR()
for both the active sensor area and the full sensor area.
+ fixed several bugs
- removed libraw-Add-Sony-ILCE-7M3.patch
- removed libraw-CVE-2020-15503.patch
-------------------------------------------------------------------
Tue Jul 7 14:20:04 UTC 2020 - pgajdos@suse.com

View File

@ -20,10 +20,10 @@
%define asan_build 0
%define tar_name LibRaw
%define lver 19
%define lver 20
%define lname libraw%{lver}
Name: libraw
Version: 0.19.5
Version: 0.20.0
Release: 0
Summary: Library for reading RAW files obtained from digital photo cameras
License: CDDL-1.0 OR LGPL-2.1-only
@ -31,9 +31,6 @@ Group: Development/Libraries/C and C++
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
# CVE-2020-15503 [bsc#1173674], lack of thumbnail size range check can lead to buffer overflow
Patch2: libraw-CVE-2020-15503.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@ -103,8 +100,6 @@ against LibRaw. LibRaw does not provide dynamic libraries.
%prep
%setup -q -n %{tar_name}-%{version}
%patch1 -p1
%patch2 -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects