Skip to content

Commit 9a3d53b

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 0c65f01 commit 9a3d53b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

core/registration.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,8 +1606,7 @@ static int prv_getId(uint8_t * data,
16061606
}
16071607
// Ignore any unrecognized attribute
16081608
}
1609-
if (data[limit] == REG_ATTR_SEPARATOR)
1610-
{
1609+
if (limit < length && data[limit] == REG_ATTR_SEPARATOR) {
16111610
limit += 1;
16121611
}
16131612
data += limit;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
</1/2/</2~.>;\FF*\F7 \A3\FF\00\00\00 ;\A3\FE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
</5>;<<\FF<>;\FF\FF\FF\FF\FF\FF\FF\FF\FF=\00\FF\A2cVCN

0 commit comments

Comments
 (0)