mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fixed an integer overflow in the dns caching code that caused nmap to loop infinitely once it had expunging the cache of older entries.
This commit is contained in:
parent
77445b81b1
commit
9bc09ef2cc
1 changed files with 2 additions and 1 deletions
|
|
@ -1041,7 +1041,8 @@ static void addto_etchosts(u32 ip, const char *hname) {
|
|||
for(i = 0; i < HASH_TABLE_SIZE; i++) {
|
||||
while((it = find_if(etchosts[i].begin(), etchosts[i].end(), remove_and_age)) != etchosts[i].end()) {
|
||||
etchosts[i].erase(it);
|
||||
total_size--;
|
||||
if((total_size--) < HASH_TABLE_SIZE/2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue