mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Avoid out-of-bounds read leading to runaway allocations. Fixes #2731
This commit is contained in:
parent
ff92f5bae9
commit
ef71e5e37d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue