aboutsummaryrefslogtreecommitdiffstats
path: root/net/ntop
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-11-17 13:12:46 +0800
committermarcus <marcus@FreeBSD.org>2004-11-17 13:12:46 +0800
commit41c0605ec142e08a2fc8dbf8d0bab8f108b80c1b (patch)
tree0575ba70ef3c5e547a2030bb14ecc0774beec90d /net/ntop
parentcc552a6612951f738dc418d34a33d75cfddc933e (diff)
downloadfreebsd-ports-gnome-41c0605ec142e08a2fc8dbf8d0bab8f108b80c1b.tar.gz
freebsd-ports-gnome-41c0605ec142e08a2fc8dbf8d0bab8f108b80c1b.tar.zst
freebsd-ports-gnome-41c0605ec142e08a2fc8dbf8d0bab8f108b80c1b.zip
Fix a potential segmentation faul when loading certain pages in the web
interface as well as in shutting down ntop. Approved by: maintainer
Diffstat (limited to 'net/ntop')
-rw-r--r--net/ntop/Makefile1
-rw-r--r--net/ntop/files/patch-util.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/net/ntop/Makefile b/net/ntop/Makefile
index 0691e9491fe1..a6006139f415 100644
--- a/net/ntop/Makefile
+++ b/net/ntop/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ntop
PORTVERSION= 3.0
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/net/ntop/files/patch-util.c b/net/ntop/files/patch-util.c
new file mode 100644
index 000000000000..0fa09ede8247
--- /dev/null
+++ b/net/ntop/files/patch-util.c
@@ -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 ;