Skip to content

Commit fc8585a

Browse files
committed
Fix out of bound read in registration handling
In some cases the code tried to read past the registration payload.
1 parent 21323a2 commit fc8585a

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

core/registration.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,8 +1604,7 @@ static int prv_getId(uint8_t * data,
16041604
}
16051605
// Ignore any unrecognized attribute
16061606
}
1607-
if (data[limit] == REG_ATTR_SEPARATOR)
1608-
{
1607+
if (limit < length && data[limit] == REG_ATTR_SEPARATOR) {
16091608
limit += 1;
16101609
}
16111610
data += limit;
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)