- fix segfault for empty interface (#234045)
This commit is contained in:
parent
98ec964987
commit
8add39743b
25
net-tools-1.60-netstat-interfaces-crash.patch
Normal file
25
net-tools-1.60-netstat-interfaces-crash.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- net-tools-1.60/netstat.c.old 2007-03-27 09:28:28.000000000 +0200
|
||||
+++ net-tools-1.60/netstat.c 2007-03-27 09:26:39.000000000 +0200
|
||||
@@ -2105,7 +2105,7 @@
|
||||
fprintf(stderr, _(" netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
|
||||
|
||||
fprintf(stderr, _(" -r, --route display routing table\n"));
|
||||
- fprintf(stderr, _(" -I, --interfaces=[<Iface>] display interface table for <Iface>\n"));
|
||||
+ fprintf(stderr, _(" -I, --interface=[<Iface>] display interface table for <Iface>\n"));
|
||||
fprintf(stderr, _(" -i, --interfaces display interface table\n"));
|
||||
fprintf(stderr, _(" -g, --groups display multicast group memberships\n"));
|
||||
fprintf(stderr, _(" -s, --statistics display networking statistics (like SNMP)\n"));
|
||||
@@ -2234,7 +2234,12 @@
|
||||
case 'I':
|
||||
if (optarg && strcmp(optarg, "(null)"))
|
||||
if (optarg[0] == '=') optarg++;
|
||||
- flag_int_name = strdup(optarg);
|
||||
+ if (optarg && strcmp(optarg, "(null)"))
|
||||
+ flag_int_name = strdup(optarg);
|
||||
+ else {
|
||||
+ usage();
|
||||
+ exit(1);
|
||||
+ }
|
||||
flag_int++;
|
||||
break;
|
||||
case 'i':
|
@ -3,7 +3,7 @@
|
||||
Summary: Basic networking tools
|
||||
Name: net-tools
|
||||
Version: 1.60
|
||||
Release: 80%{?dist}
|
||||
Release: 81%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
URL: http://www.tazenda.demon.co.uk/phil/net-tools/
|
||||
@ -72,6 +72,7 @@ Patch58: net-tools-1.60-nameif_strncpy.patch
|
||||
Patch59: net-tools-1.60-arp-unaligned-access.patch
|
||||
Patch60: net-tools-1.60-sctp-quiet.patch
|
||||
Patch61: net-tools-1.60-remove_node.patch
|
||||
Patch62: net-tools-1.60-netstat-interfaces-crash.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires(post): /sbin/chkconfig
|
||||
@ -144,6 +145,7 @@ ifconfig, netstat, route, and others.
|
||||
%patch59 -p1 -b .arp-un-access
|
||||
%patch60 -p1 -b .quiet
|
||||
%patch61 -p1
|
||||
%patch62 -p1 -b .iface-crash
|
||||
|
||||
cp %SOURCE2 ./config.h
|
||||
cp %SOURCE3 ./config.make
|
||||
@ -259,6 +261,9 @@ exit 0
|
||||
%{_sysconfdir}/rc.d/init.d/netplugd
|
||||
|
||||
%changelog
|
||||
* Tue Mar 27 2007 Radek Vokál <rvokal@redhat.com> - 1.60-81
|
||||
- fix segfault for empty interface (#234045)
|
||||
|
||||
* Thu Mar 15 2007 Radek Vokál <rvokal@redhat.com> - 1.60-80
|
||||
- we don't have -n/--node option (#225554)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user