!31 [sync] PR-30: 修复makernotes.cpp和misc_parsers.cpp中使用了未初始化变量
From: @openeuler-sync-bot Reviewed-by: @licihua Signed-off-by: @licihua
This commit is contained in:
commit
da059c053d
@ -1,6 +1,6 @@
|
||||
Name: LibRaw
|
||||
Version: 0.20.2
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Library for reading RAW files obtained from digital photo cameras
|
||||
License: BSD and (CDDL or LGPLv2)
|
||||
URL: http://www.libraw.org
|
||||
@ -8,6 +8,8 @@ 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
|
||||
Provides: bundled(dcraw) = 9.25
|
||||
@ -68,6 +70,9 @@ rm -rfv samples/.deps samples/.dirstamp samples/*.o
|
||||
%exclude %{_docdir}/libraw/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Thu Jun 3 2021 zhangjiapeng <zhangjiapeng9@huawei.com> - 0.20.2-4
|
||||
- fix use of uninitialized value
|
||||
|
||||
|
||||
12
fix-use-of-uninitialized-value-in-makernotes.patch
Normal file
12
fix-use-of-uninitialized-value-in-makernotes.patch
Normal file
@ -0,0 +1,12 @@
|
||||
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 */
|
||||
13
fix-use-of-uninitialized-value-in-misc_parsers.patch
Normal file
13
fix-use-of-uninitialized-value-in-misc_parsers.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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;
|
||||
Loading…
x
Reference in New Issue
Block a user