bugfix about uninitialized value

This commit is contained in:
orange-snn 2020-03-10 15:08:06 +08:00
parent 37d84444e6
commit 75bc50ce47
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 741b491fe63fd5848b6ce4a3c09ec9a16bac9f6b Mon Sep 17 00:00:00 2001
From: songnannan2 <songnannan2@huawei.com>
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

View File

@ -2,7 +2,7 @@
Name: libarchive Name: libarchive
Version: 3.4.1 Version: 3.4.1
Release: 1 Release: 2
Summary: Multi-format archive and compression library Summary: Multi-format archive and compression library
License: BSD License: BSD
@ -16,6 +16,8 @@ BuildRequires: openssl-devel libxml2-devel lz4-devel automake libzstd-devel
Provides: bsdtar bsdcpio bsdcat Provides: bsdtar bsdcpio bsdcat
Obsoletes: bsdtar bsdcpio bsdcat Obsoletes: bsdtar bsdcpio bsdcat
Patch6001: libarchive-uninitialized-value.patch
%description %description
%{name} is an open-source BSD-licensed C programming library that %{name} is an open-source BSD-licensed C programming library that
provides streaming access to a variety of different archive formats, provides streaming access to a variety of different archive formats,
@ -145,6 +147,9 @@ run_testsuite
%{_mandir}/man5/* %{_mandir}/man5/*
%changelog %changelog
* Tue Mar 10 2020 songnannan <songnannan2@huawei.com> - 3.4.1-2
- bugfix about uninitialized value
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.4.1-1 * Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.4.1-1
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA