mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Fix a potential segmentation faul when loading certain pages in the web
interface as well as in shutting down ntop. Approved by: maintainer
This commit is contained in:
parent
6019e9a1a9
commit
14d6c6a69a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=121791
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= ntop
|
||||
PORTVERSION= 3.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
12
net/ntop/files/patch-util.c
Normal file
12
net/ntop/files/patch-util.c
Normal file
@ -0,0 +1,12 @@
|
||||
--- util.c.orig Thu Oct 28 03:00:09 2004
|
||||
+++ util.c Thu Oct 28 02:58:27 2004
|
||||
@@ -453,7 +453,8 @@
|
||||
if(!strcmp(ii->name,device))
|
||||
if(iface_if_getinfo(ii) & IFACE_INFO_UP) {
|
||||
/* Allocate memory for IPv6 addresses*/
|
||||
- count = iface_if_addrcount(ii, AF_INET6);
|
||||
+ if ((count = iface_if_addrcount(ii, AF_INET6)) == 0)
|
||||
+ return NULL;
|
||||
addrs = (NtopIfaceAddr *)calloc(count, sizeof(NtopIfaceAddr));
|
||||
addr_pos = 0;
|
||||
for(ia = iface_getaddr_first(ii, AF_INET6) ; ia ;
|
Loading…
Reference in New Issue
Block a user