!19 [sync] PR-18: fix fuzz: use of uninitialized value

From: @openeuler-sync-bot
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2021-09-01 07:58:44 +00:00 committed by Gitee
commit cdcbabb64f
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 25fb99653f3f7c7ba5279beb00379089987cca50 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Wed, 1 Sep 2021 15:13:18 +0800
Subject: [PATCH] fix use of uninitialized value
---
src/libstrongswan/bio/bio_reader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libstrongswan/bio/bio_reader.c b/src/libstrongswan/bio/bio_reader.c
index e6b459b..2ae629e 100644
--- a/src/libstrongswan/bio/bio_reader.c
+++ b/src/libstrongswan/bio/bio_reader.c
@@ -122,7 +122,7 @@ static bool read_uint16_internal(private_bio_reader_t *this, uint16_t *res,
static bool read_uint24_internal(private_bio_reader_t *this, uint32_t *res,
bool from_end)
{
- uint32_t tmp;
+ uint32_t tmp = 0;
if (this->buf.len < 3)
{
--
2.27.0

View File

@ -1,12 +1,13 @@
Name: strongswan
Version: 5.7.2
Release: 7
Release: 8
Summary: An OpenSource IPsec-based VPN and TNC solution
License: GPLv2+
URL: http://www.strongswan.org/
Source0: http://download.strongswan.org/strongswan-%{version}.tar.bz2
Patch0: strongswan-multiple-definition.patch
Patch1: fix-use-of-uninitialized-value.patch
BuildRequires: gcc systemd-devel gmp-devel libcurl-devel NetworkManager-libnm-devel openldap-devel
BuildRequires: openssl-devel sqlite-devel gettext-devel trousers-devel libxml2-devel pam-devel
@ -173,6 +174,9 @@ install -d -m 700 %{buildroot}%{_sysconfdir}/strongswan/ipsec.d/{aacerts acerts
%{_libexecdir}/strongswan/charon-nm
%changelog
* Wed Sep 1 2021 caodongxia <caodongxia@huawei.com> - 5.7.2-8
- fix fuzz: use of uninitialized value
* Mon Aug 4 2021 shdluan <shdluan@163.com> - 5.7.2-7
- fix multiple defination of variable