mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 11:17:46 +00:00
[settings] fix bootloop when more than 255 ChildInfo entries are stored (#4640)
In MleRouter::RestoreChildren() there is an iteration over all ChildInfo items. This iterator uses mIndex which is uint8_t and in our case its value wraps causing infinite loop. Changing mIndex to uint16_t fixes this issue.
This commit is contained in:
@@ -763,7 +763,7 @@ public:
|
||||
void Read(void);
|
||||
|
||||
ChildInfo mChildInfo;
|
||||
uint8_t mIndex;
|
||||
uint16_t mIndex;
|
||||
bool mIsDone;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user