diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-11-17 05:12:46 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-11-17 05:12:46 +0000 |
commit | 14d6c6a69ad78a0511c651550e6e2ec6bf1604c1 (patch) | |
tree | 005b5b3f554b242371fa0c7824073768d0406ecd /net/ntop/files | |
parent | Add an extra patch site. (diff) |
Fix a potential segmentation faul when loading certain pages in the web
interface as well as in shutting down ntop.
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=121791
Diffstat (limited to 'net/ntop/files')
-rw-r--r-- | net/ntop/files/patch-util.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 ; |