Skip to content

Commit

Permalink
coap_oscore.c: Fix parsing OSCORE configuration information
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Jan 26, 2024
1 parent c7c3275 commit 2b28d8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/coap_oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1678,11 +1678,12 @@ get_split_entry(const char **start,
oscore_value_t *value) {
const char *begin = *start;
const char *end;
const char *kend;
const char *split;
size_t i;

retry:
end = memchr(begin, '\n', size);
kend = end = memchr(begin, '\n', size);
if (end == NULL)
return 0;

Expand All @@ -1693,7 +1694,7 @@ get_split_entry(const char **start,

if (begin[0] == '#' || (end - begin) == 0) {
/* Skip comment / blank line */
size -= end - begin + 1;
size -= kend - begin + 1;
begin = *start;
goto retry;
}
Expand Down

0 comments on commit 2b28d8b

Please sign in to comment.