[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:
Jonathan Hui
2020-03-05 14:13:37 -08:00
committed by GitHub
parent 225f9b58eb
commit a75b412ecf
+1 -1
View File
@@ -763,7 +763,7 @@ public:
void Read(void);
ChildInfo mChildInfo;
uint8_t mIndex;
uint16_t mIndex;
bool mIsDone;
};