INN commit: trunk/innfeed (host.c)
INN Commit
Russ_Allbery at isc.org
Sat Apr 26 11:30:31 UTC 2008
Date: Saturday, April 26, 2008 @ 04:30:30
Author: iulius
Revision: 7800
Fix a bug in hostDeleteIpv4Addr(): after innfeed has called that
function, host->nextIpAddr can point outside the host->ipAddrs[] array.
Modified:
trunk/innfeed/host.c
--------+
host.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Modified: host.c
===================================================================
--- host.c 2008-04-26 08:48:19 UTC (rev 7799)
+++ host.c 2008-04-26 11:30:30 UTC (rev 7800)
@@ -1222,10 +1222,10 @@
for (i = 0, j = 0; host->ipAddrs[i]; i++) {
if (host->ipAddrs[i]->sa_family != AF_INET)
host->ipAddrs[j++] = host->ipAddrs[i];
- if (i == host->nextIpAddr)
- host->nextIpAddr -= (i - j);
}
host->ipAddrs[j] = 0;
+ if (host->nextIpAddr >= j)
+ host->nextIpAddr = 0;
}
More information about the inn-committers
mailing list