fix lldptool coredump
(cherry picked from commit 9b90b7e656e4454a879a029b3c4918e92e6df9f2)
This commit is contained in:
parent
b1cddcf578
commit
bec1207ee1
32
backport-lldptool-fix-null-pointer-deference.patch
Normal file
32
backport-lldptool-fix-null-pointer-deference.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 32a19025bcaa705590c536f801a85e1e57d42942 Mon Sep 17 00:00:00 2001
|
||||
From: gaoxingwang <gxw94linux@163.com>
|
||||
Date: Wed, 26 Oct 2022 15:23:30 +0800
|
||||
Subject: [PATCH] lldptool: fix null pointer deference
|
||||
|
||||
---
|
||||
weak_readline.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/weak_readline.c b/weak_readline.c
|
||||
index 6b14f07..2d8da46 100644
|
||||
--- a/weak_readline.c
|
||||
+++ b/weak_readline.c
|
||||
@@ -80,10 +80,14 @@ void using_history(void)
|
||||
void close_history(void)
|
||||
{
|
||||
if (inited) {
|
||||
- dlclose(rl_handle);
|
||||
- rl_handle = NULL;
|
||||
- dlclose(hist_handle);
|
||||
- hist_handle = NULL;
|
||||
+ if (rl_handle) {
|
||||
+ dlclose(rl_handle);
|
||||
+ rl_handle = NULL;
|
||||
+ }
|
||||
+ if (hist_handle) {
|
||||
+ dlclose(hist_handle);
|
||||
+ hist_handle = NULL;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
Name: lldpad
|
||||
Version: 1.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Intel LLDP Agent
|
||||
License: GPLv2
|
||||
URL: https://www.open-lldp.org
|
||||
@ -15,6 +15,7 @@ Patch2: backport-8021qaz-squelch-initialization-errors.patch
|
||||
Patch3: backport-basman-use-return-address-when-pulling-address.patch
|
||||
Patch4: backport-macvtap-fix-error-condition.patch
|
||||
Patch5: backport-vdp22-convert-command-parsing-to-null-term.patch
|
||||
Patch6: backport-lldptool-fix-null-pointer-deference.patch
|
||||
|
||||
BuildRequires: automake autoconf libtool flex kernel-headers libconfig-devel
|
||||
BuildRequires: libnl3-devel readline-devel systemd
|
||||
@ -89,6 +90,12 @@ make check
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 01 2022 gaihuiying <eaglegai@163.com> - 1.1-4
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:fix lldptool coredump
|
||||
|
||||
* Wed Sep 14 2022 yanglu <yanglu72@h-partners.com> - 1.1-3
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user