mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[router-table] validate num routers when processing Route TLV (#2744)
Credit to OSS-Fuzz.
This commit is contained in:
@@ -115,7 +115,7 @@ void RouterTable::UpdateAllocation(void)
|
||||
// build index map
|
||||
for (uint8_t i = 0; i <= Mle::kMaxRouterId; i++)
|
||||
{
|
||||
if (IsAllocated(i))
|
||||
if (IsAllocated(i) && mActiveRouterCount < Mle::kMaxRouters)
|
||||
{
|
||||
indexMap[i] = mActiveRouterCount++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user