mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid out-of-bounds read leading to runaway allocations. Fixes #2731
This commit is contained in:
@@ -319,7 +319,7 @@ static void trie_split (struct trie_node *this, const u32 *addr, const u32 *mask
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (new_mask[i] >= this->mask[i]) {
|
||||
if (i >= 4 || new_mask[i] >= this->mask[i]) {
|
||||
/* This node completely contains the new addr and mask. No need to split or add */
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user