Skip to content

Commit

Permalink
examples/lte_lwm2m: Fix buffer overrun
Browse files Browse the repository at this point in the history
  • Loading branch information
SPRESENSE committed Mar 6, 2023
2 parents 1d17dfb + 48423a0 commit 750fcbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/lte_lwm2m/object_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ lwm2m_object_t * get_test_object(void)
targetP->dec = -30 + i + (double)i/100.0;
char * str = lwm2m_malloc(i + 1);
str[0] = 0;
for (int j = 0; j <= i; j++) {
for (int j = 0; j < i; j++) {
strcat(str, "I");
}
targetP->str = str;
Expand Down
2 changes: 1 addition & 1 deletion externals/lwm2m/wakaama/examples/client/object_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ lwm2m_object_t * get_test_object(void)
targetP->dec = -30 + i + (double)i/100.0;
char * str = lwm2m_malloc(i + 1);
str[0] = 0;
for (int j = 0; j <= i; j++) {
for (int j = 0; j < i; j++) {
strcat(str, "I");
}
targetP->str = str;
Expand Down

0 comments on commit 750fcbb

Please sign in to comment.