Compare commits

..

No commits in common. "093acf2a390d4a5bcdb5bc84b451af73af3782fb" and "9670022f2d54f591001f6be75122b231eb7a41de" have entirely different histories.

5 changed files with 14 additions and 55 deletions

View File

@ -1,37 +0,0 @@
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

BIN
libnet-1.1.6.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,12 +1,11 @@
Name: libnet
Version: 1.2
Release: 3
Version: 1.1.6
Release: 17
Summary: A C library to help with construction and handling of network packets
License: BSD
URL: https://github.com/libnet/libnet/
Source: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
Patch0: backport-Fix-possible-overflows.patch
BuildRequires: automake autoconf libtool
URL: http://www.sourceforge.net/projects/libnet-dev/
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
BuildRequires: automake autoconf libtool
%description
Libbet provides a fairly portable framework for network packet
@ -56,28 +55,21 @@ rm -f doc/html/Makefile*
%postun -p /sbin/ldconfig
%files
%doc doc/COPYING
%{_libdir}/%{name}.so.*
%files devel
%doc __dist_sample/sample/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_bindir}/%{name}-config
%{_includedir}/%{name}/
%{_includedir}/libnet.h
%files help
%doc README.md ChangeLog.md doc/MIGRATION.md doc/RAWSOCKET.md
%doc %{_docdir}/*
%doc README doc/CHANGELOG doc/CONTRIB doc/DESIGN_NOTES doc/MIGRATION
%doc doc/PACKET_BUILDING doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/
%{_mandir}/man3/%{name}*.3*
%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
- Pakcage init

4
libnet.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: libnet/libnet
tag_prefix: v
seperator: .