Compare commits
14 Commits
9670022f2d
...
093acf2a39
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
093acf2a39 | ||
|
|
c3b128f134 | ||
|
|
cc7df1f9d3 | ||
|
|
843970b945 | ||
|
|
078746132c | ||
|
|
11b1b54585 | ||
|
|
8387788de2 | ||
|
|
32ac362e04 | ||
|
|
1261167375 | ||
|
|
32bd7c5c6a | ||
|
|
eceb8e6555 | ||
|
|
40943aa290 | ||
|
|
35638c756d | ||
|
|
410f403b58 |
37
backport-Fix-possible-overflows.patch
Normal file
37
backport-Fix-possible-overflows.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 425162fb7a9577f212d44c1b6f6e2ccc36acf131 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Habets <habets@google.com>
|
||||||
|
Date: Fri, 1 Nov 2019 17:08:08 +0000
|
||||||
|
Subject: [PATCH 1/1] Fix possible overflows
|
||||||
|
|
||||||
|
---
|
||||||
|
src/libnet_port_list.c | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libnet_port_list.c b/src/libnet_port_list.c
|
||||||
|
index fff151e..942a856 100644
|
||||||
|
--- a/src/libnet_port_list.c
|
||||||
|
+++ b/src/libnet_port_list.c
|
||||||
|
@@ -250,16 +250,17 @@ libnet_plist_chain_dump_string(libnet_plist_t *plist)
|
||||||
|
{
|
||||||
|
if (plist->bport == plist->eport)
|
||||||
|
{
|
||||||
|
- i = snprintf(&buf[j], BUFSIZ, "%d", plist->bport);
|
||||||
|
+ i = snprintf(&buf[j], BUFSIZ-j, "%d", plist->bport);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- i = snprintf(&buf[j], BUFSIZ, "%d-%d", plist->bport, plist->eport);
|
||||||
|
+ i = snprintf(&buf[j], BUFSIZ-j, "%d-%d", plist->bport, plist->eport);
|
||||||
|
}
|
||||||
|
j += i;
|
||||||
|
if (plist->next)
|
||||||
|
{
|
||||||
|
- snprintf(&buf[j++], BUFSIZ, ",");
|
||||||
|
+ snprintf(&buf[j], BUFSIZ-j, ",");
|
||||||
|
+ j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (strdup(buf)); /* XXX - reentrancy == no */
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
Binary file not shown.
BIN
libnet-1.2.tar.gz
Normal file
BIN
libnet-1.2.tar.gz
Normal file
Binary file not shown.
28
libnet.spec
28
libnet.spec
@ -1,11 +1,12 @@
|
|||||||
Name: libnet
|
Name: libnet
|
||||||
Version: 1.1.6
|
Version: 1.2
|
||||||
Release: 17
|
Release: 3
|
||||||
Summary: A C library to help with construction and handling of network packets
|
Summary: A C library to help with construction and handling of network packets
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://www.sourceforge.net/projects/libnet-dev/
|
URL: https://github.com/libnet/libnet/
|
||||||
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
|
Source: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
BuildRequires: automake autoconf libtool
|
Patch0: backport-Fix-possible-overflows.patch
|
||||||
|
BuildRequires: automake autoconf libtool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Libbet provides a fairly portable framework for network packet
|
Libbet provides a fairly portable framework for network packet
|
||||||
@ -55,21 +56,28 @@ rm -f doc/html/Makefile*
|
|||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc doc/COPYING
|
|
||||||
%{_libdir}/%{name}.so.*
|
%{_libdir}/%{name}.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc __dist_sample/sample/
|
|
||||||
%{_libdir}/%{name}.so
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_bindir}/%{name}-config
|
%{_bindir}/%{name}-config
|
||||||
%{_includedir}/%{name}/
|
%{_includedir}/%{name}/
|
||||||
%{_includedir}/libnet.h
|
%{_includedir}/libnet.h
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc README doc/CHANGELOG doc/CONTRIB doc/DESIGN_NOTES doc/MIGRATION
|
%doc README.md ChangeLog.md doc/MIGRATION.md doc/RAWSOCKET.md
|
||||||
%doc doc/PACKET_BUILDING doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/
|
%doc %{_docdir}/*
|
||||||
%{_mandir}/man3/%{name}*.3*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 05 2024 zhangpan<zhangpan103@h-partners.com> - 1.2-3
|
||||||
|
- delete redundant files
|
||||||
|
|
||||||
|
* Wed Dec 27 2023 lvgenggeng<lvgenggeng@uniontech.com> - 1.2-2
|
||||||
|
- backport: fix possible overflows
|
||||||
|
|
||||||
|
* Wed Aug 19 2020 yuboyun<yuboyun@huawei.com> - 1.2-1
|
||||||
|
- Update to version 1.2
|
||||||
|
|
||||||
* Tue Sep 17 2019 Yiru Wang <wangyiru1@huawei.com> - 1.1.6-17
|
* Tue Sep 17 2019 Yiru Wang <wangyiru1@huawei.com> - 1.1.6-17
|
||||||
- Pakcage init
|
- Pakcage init
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: libnet/libnet
|
|
||||||
tag_prefix: v
|
|
||||||
seperator: .
|
|
||||||
Loading…
x
Reference in New Issue
Block a user