From 75bc50ce471a2b8601da728157c3a806f12aaa74 Mon Sep 17 00:00:00 2001 From: orange-snn Date: Tue, 10 Mar 2020 15:08:06 +0800 Subject: [PATCH] bugfix about uninitialized value --- libarchive-uninitialized-value.patch | 26 ++++++++++++++++++++++++++ libarchive.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 libarchive-uninitialized-value.patch diff --git a/libarchive-uninitialized-value.patch b/libarchive-uninitialized-value.patch new file mode 100644 index 0000000..489eae2 --- /dev/null +++ b/libarchive-uninitialized-value.patch @@ -0,0 +1,26 @@ +From 741b491fe63fd5848b6ce4a3c09ec9a16bac9f6b Mon Sep 17 00:00:00 2001 +From: songnannan2 +Date: Tue, 18 Feb 2020 22:16:04 +0800 +Subject: [PATCH] there need to add the init of child to solve the +problem in oss-fuzz + +--- + libarchive/filter_fork_posix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libarchive/filter_fork_posix.c b/libarchive/filter_fork_posix.c +index 02dbd4b..285dd48 100644 +--- a/libarchive/filter_fork_posix.c ++++ b/libarchive/filter_fork_posix.c +@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/filter_fork.c 182958 2008-09-12 05:33:00 + pid_t + __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) + { +- pid_t child; ++ pid_t child = -1; + int stdin_pipe[2], stdout_pipe[2], tmp; + #if HAVE_POSIX_SPAWNP + posix_spawn_file_actions_t actions; +-- +2.19.1 + diff --git a/libarchive.spec b/libarchive.spec index 18a0126..6b59449 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -2,7 +2,7 @@ Name: libarchive Version: 3.4.1 -Release: 1 +Release: 2 Summary: Multi-format archive and compression library License: BSD @@ -16,6 +16,8 @@ BuildRequires: openssl-devel libxml2-devel lz4-devel automake libzstd-devel Provides: bsdtar bsdcpio bsdcat Obsoletes: bsdtar bsdcpio bsdcat +Patch6001: libarchive-uninitialized-value.patch + %description %{name} is an open-source BSD-licensed C programming library that provides streaming access to a variety of different archive formats, @@ -145,6 +147,9 @@ run_testsuite %{_mandir}/man5/* %changelog +* Tue Mar 10 2020 songnannan - 3.4.1-2 +- bugfix about uninitialized value + * Wed Jan 8 2020 openEuler Buildteam - 3.4.1-1 - Type:bugfix - ID:NA