Skip to content

Commit

Permalink
Fix out of bound read in registration handling
Browse files Browse the repository at this point in the history
In some cases the code tried to read past the registration payload.
  • Loading branch information
LukasWoodtli committed Aug 15, 2023
1 parent 21323a2 commit fc8585a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/registration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,8 +1604,7 @@ static int prv_getId(uint8_t * data,
}
// Ignore any unrecognized attribute
}
if (data[limit] == REG_ATTR_SEPARATOR)
{
if (limit < length && data[limit] == REG_ATTR_SEPARATOR) {
limit += 1;
}
data += limit;
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit fc8585a

Please sign in to comment.