Upgrade to 0.21.1
This commit is contained in:
parent
da059c053d
commit
b1cf84960e
BIN
0.20.2.tar.gz
BIN
0.20.2.tar.gz
Binary file not shown.
BIN
0.21.1.tar.gz
Normal file
BIN
0.21.1.tar.gz
Normal file
Binary file not shown.
25
LibRaw-pkgconfig.patch
Normal file
25
LibRaw-pkgconfig.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- LibRaw-0.21.0/libraw.pc.in~ 2022-12-18 01:26:41.000000000 -0600
|
||||
+++ LibRaw-0.21.0/libraw.pc.in 2022-12-19 10:27:02.793929537 -0600
|
||||
@@ -6,7 +6,9 @@
|
||||
Name: libraw
|
||||
Description: Raw image decoder library (non-thread-safe)
|
||||
Requires: @PACKAGE_REQUIRES@
|
||||
+Requires.private: @PACKAGE_REQUIRES@
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
|
||||
+Libs: -L${libdir} -lraw@PC_OPENMP@
|
||||
+Libs.private: -lstdc++
|
||||
Libs.private: @PACKAGE_LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}/libraw -I${includedir}
|
||||
--- LibRaw-0.21.0/libraw_r.pc.in~ 2022-12-18 01:26:41.000000000 -0600
|
||||
+++ LibRaw-0.21.0/libraw_r.pc.in 2022-12-19 10:28:30.620571338 -0600
|
||||
@@ -6,7 +6,8 @@
|
||||
Name: libraw
|
||||
Description: Raw image decoder library (thread-safe)
|
||||
Requires: @PACKAGE_REQUIRES@
|
||||
+Requires.private: @PACKAGE_REQUIRES@
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@
|
||||
+Libs: -L${libdir} -lraw_r@PC_OPENMP@
|
||||
Libs.private: @PACKAGE_LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}/libraw -I${includedir}
|
||||
27
LibRaw.spec
27
LibRaw.spec
@ -1,17 +1,15 @@
|
||||
Name: LibRaw
|
||||
Version: 0.20.2
|
||||
Release: 5
|
||||
Version: 0.21.1
|
||||
Release: 1
|
||||
Summary: Library for reading RAW files obtained from digital photo cameras
|
||||
License: BSD and (CDDL or LGPLv2)
|
||||
License: BSD-3-Clause and (CDDL-1.0 or LGPL-2.1-only)
|
||||
URL: http://www.libraw.org
|
||||
Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
|
||||
Patch0000: prevent-buffer-overrun-in-parse_rollei.patch
|
||||
Patch0001: fix-stack-buffer-overflow-in-LibRaw_buffer_datastream_gets.patch
|
||||
Patch0002: fix-use-of-uninitialized-value.patch
|
||||
Patch0003: fix-use-of-uninitialized-value-in-makernotes.patch
|
||||
Patch0004: fix-use-of-uninitialized-value-in-misc_parsers.patch
|
||||
BuildRequires: gcc-c++ pkgconfig(lcms2) pkgconfig(libjpeg)
|
||||
BuildRequires: autoconf automake libtool
|
||||
Patch0: LibRaw-pkgconfig.patch
|
||||
|
||||
BuildRequires: gcc-c++ pkgconfig(lcms2) pkgconfig(libjpeg)
|
||||
BuildRequires: autoconf automake libtool make
|
||||
|
||||
Provides: bundled(dcraw) = 9.25
|
||||
%description
|
||||
LibRaw is a library for reading RAW files from digital photo cameras (CRW/CR2, NEF,
|
||||
@ -51,14 +49,10 @@ chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt manual/*.html
|
||||
rm -rfv samples/.deps samples/.dirstamp samples/*.o
|
||||
%delete_la
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc Changelog.txt
|
||||
%license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
|
||||
%{_libdir}/{libraw,libraw_r}.so.20*
|
||||
%{_libdir}/{libraw,libraw_r}.so.23*
|
||||
|
||||
%files devel
|
||||
%doc manual samples
|
||||
@ -70,6 +64,9 @@ rm -rfv samples/.deps samples/.dirstamp samples/*.o
|
||||
%exclude %{_docdir}/libraw/*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 02 2023 Li Long <lilong@kylinos.cn> - 0.21.1-1
|
||||
- Upgrade to 0.21.1
|
||||
|
||||
* Fri Feb 25 2022 xu_ping <xuping33@huawei.com> - 0.20.2-5
|
||||
- fix use of uninitialized value of makernotes.cpp and misc_parsers.cpp
|
||||
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From e70ded8b0bc231f7ed3fd5d2e83d61bd18ef5e94 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Tutubalin <lexa@lexa.ru>
|
||||
Date: Thu, 3 Dec 2020 12:28:52 +0300
|
||||
Subject: [PATCH] LibRaw_buffer_datastream: gets() not always returns
|
||||
0-terminated string
|
||||
|
||||
Reverted back parse_rollei change
|
||||
---
|
||||
src/libraw_datastream.cpp | 7 +++++--
|
||||
src/metadata/misc_parsers.cpp | 1 -
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/libraw_datastream.cpp b/src/libraw_datastream.cpp
|
||||
index 606e5de7..eaf071ee 100644
|
||||
--- a/src/libraw_datastream.cpp
|
||||
+++ b/src/libraw_datastream.cpp
|
||||
@@ -422,7 +422,7 @@ char *LibRaw_buffer_datastream::gets(char *s, int sz)
|
||||
psrc = buf + streampos;
|
||||
pdest = str;
|
||||
if(streampos >= streamsize) return NULL;
|
||||
- while ((size_t(psrc - buf) < streamsize) && ((pdest - str) < sz))
|
||||
+ while ((size_t(psrc - buf) < streamsize) && ((pdest - str) < (sz-1)))
|
||||
{
|
||||
*pdest = *psrc;
|
||||
if (*psrc == '\n')
|
||||
@@ -432,8 +432,11 @@ char *LibRaw_buffer_datastream::gets(char *s, int sz)
|
||||
}
|
||||
if (size_t(psrc - buf) < streamsize)
|
||||
psrc++;
|
||||
- if ((pdest - str) < sz)
|
||||
+ if ((pdest - str) < sz-1)
|
||||
*(++pdest) = 0;
|
||||
+ else
|
||||
+ s[sz - 1] = 0; // ensure trailing zero
|
||||
+
|
||||
streampos = psrc - buf;
|
||||
return s;
|
||||
}
|
||||
diff --git a/src/metadata/misc_parsers.cpp b/src/metadata/misc_parsers.cpp
|
||||
index 4e36e940..7a74c9f1 100644
|
||||
--- a/src/metadata/misc_parsers.cpp
|
||||
+++ b/src/metadata/misc_parsers.cpp
|
||||
@@ -304,7 +304,6 @@ void LibRaw::parse_rollei()
|
||||
line[0] = 0;
|
||||
if (!fgets(line, 128, ifp))
|
||||
break;
|
||||
- line[127] = 0;
|
||||
if(!line[0]) break; // zero-length
|
||||
if ((val = strchr(line, '=')))
|
||||
*val++ = 0;
|
||||
@ -1,12 +0,0 @@
|
||||
diff --git a/src/metadata/makernotes.cpp b/src/metadata/makernotes.cpp
|
||||
index 9433abd..7ae80f5 100644
|
||||
--- a/src/metadata/makernotes.cpp
|
||||
+++ b/src/metadata/makernotes.cpp
|
||||
@@ -396,6 +396,7 @@ void LibRaw::parse_makernote(int base, int uptag)
|
||||
is_Sony = 1;
|
||||
}
|
||||
|
||||
+ memset(buf, '0', 10);
|
||||
fread(buf, 1, 10, ifp);
|
||||
|
||||
if (!strncmp(buf, "KDK", 3) || /* these aren't TIFF tables */
|
||||
@ -1,13 +0,0 @@
|
||||
diff --git a/src/metadata/misc_parsers.cpp b/src/metadata/misc_parsers.cpp
|
||||
index 7a74c9f..9a2d83d 100644
|
||||
--- a/src/metadata/misc_parsers.cpp
|
||||
+++ b/src/metadata/misc_parsers.cpp
|
||||
@@ -299,6 +299,8 @@ void LibRaw::parse_rollei()
|
||||
|
||||
fseek(ifp, 0, SEEK_SET);
|
||||
memset(&t, 0, sizeof t);
|
||||
+ memset(line, '0', 128);
|
||||
+ val = line;
|
||||
do
|
||||
{
|
||||
line[0] = 0;
|
||||
@ -1,20 +0,0 @@
|
||||
diff --git a/src/metadata/sony.cpp b/src/metadata/sony.cpp
|
||||
index 120340b..2e8dd49 100644
|
||||
--- a/src/metadata/sony.cpp
|
||||
+++ b/src/metadata/sony.cpp
|
||||
@@ -1071,6 +1071,7 @@ void LibRaw::parseSonyMakernotes(
|
||||
(len >= 196))
|
||||
{
|
||||
table_buf = (uchar *)malloc(len);
|
||||
+ memset(table_buf,0,len);
|
||||
fread(table_buf, len, 1, ifp);
|
||||
|
||||
lid = 0x01 << 2;
|
||||
@@ -1106,6 +1107,7 @@ void LibRaw::parseSonyMakernotes(
|
||||
(len >= 227))
|
||||
{
|
||||
table_buf = (uchar *)malloc(len);
|
||||
+ memset(table_buf,0,len);
|
||||
fread(table_buf, len, 1, ifp);
|
||||
|
||||
lid = 0x0;
|
||||
@ -1,21 +0,0 @@
|
||||
From 539d07dcaa64aed706c5bb4ada7213e3e1cd07d6 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Tutubalin <lexa@lexa.ru>
|
||||
Date: Mon, 30 Nov 2020 13:13:19 +0300
|
||||
Subject: [PATCH] prevent buffer overrun in parse_rollei
|
||||
|
||||
---
|
||||
src/metadata/misc_parsers.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/metadata/misc_parsers.cpp b/src/metadata/misc_parsers.cpp
|
||||
index 7a74c9f1..4e36e940 100644
|
||||
--- a/src/metadata/misc_parsers.cpp
|
||||
+++ b/src/metadata/misc_parsers.cpp
|
||||
@@ -304,6 +304,7 @@ void LibRaw::parse_rollei()
|
||||
line[0] = 0;
|
||||
if (!fgets(line, 128, ifp))
|
||||
break;
|
||||
+ line[127] = 0;
|
||||
if(!line[0]) break; // zero-length
|
||||
if ((val = strchr(line, '=')))
|
||||
*val++ = 0;
|
||||
Loading…
x
Reference in New Issue
Block a user