mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-01 18:37:10 +03:00
coap_uri.c: Fix off by one checking error
This commit is contained in:
1 parent
53318b81ae
commit
dadb9a36f1
1 file changed
+1
-1
+1
-1
@@ -466,7 +466,7 @@ check_segment(const uint8_t *s, size_t length, size_t *segment_size) {
|
||||
|
||||
while (length) {
|
||||
if (*s == '%') {
|
||||
if (length < 2 || !(isxdigit(s[1]) && isxdigit(s[2])))
|
||||
if (length < 3 || !(isxdigit(s[1]) && isxdigit(s[2])))
|
||||
return -1;
|
||||
|
||||
s += 2;
|
||||
|
||||
Reference in new issue
Block a user