fix Potential Null Pointer Dereference
This commit is contained in:
parent
7e04576086
commit
1060d8c77a
25
backport-fix-Potential-Null-Pointer-Dereference.patch
Normal file
25
backport-fix-Potential-Null-Pointer-Dereference.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 1c0e8ac9c02d82209a3405a972174a795d044038 Mon Sep 17 00:00:00 2001
|
||||
From: qingkaishi <qingkaishi@gmail.com>
|
||||
Date: Wed, 9 Sep 2020 23:58:28 +0800
|
||||
Subject: [PATCH] fix Potential Null Pointer Dereference
|
||||
|
||||
---
|
||||
test/dnet/fw.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/dnet/fw.c b/test/dnet/fw.c
|
||||
index 1557827..c845263 100644
|
||||
--- a/test/dnet/fw.c
|
||||
+++ b/test/dnet/fw.c
|
||||
@@ -108,7 +108,7 @@ arg_to_fr(int argc, char *argv[], struct fw_rule *fr)
|
||||
|
||||
p = strtok(argv[4], ":");
|
||||
|
||||
- if (addr_aton(p, &fr->fw_src) < 0)
|
||||
+ if (!p || addr_aton(p, &fr->fw_src) < 0)
|
||||
return (-1);
|
||||
|
||||
if ((p = strtok(NULL, ":")) != NULL) {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
Name: libdnet
|
||||
Version: 1.14
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Simple portable interface work with low-level networking routines
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/ofalk/%{name}
|
||||
Source: https://github.com/ofalk/libdnet/archive/%{name}-%{version}.tar.gz
|
||||
Patch0: backport-fix-Potential-Null-Pointer-Dereference.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python3-Cython
|
||||
@ -97,6 +98,12 @@ popd
|
||||
%{_mandir}/man8/*.8*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 01 2022 xingwei <xingwei14@h-partners.com> - 1.14-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: fix Potential Null Pointer Dereference
|
||||
|
||||
* Wed Jan 27 2021 xihaochen <xihaochen@huawei.com> - 1.14-1
|
||||
- Type:requirements
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user