Skip to content

Commit

Permalink
Merge pull request #15404 from IVOES/fix-overrunning-write
Browse files Browse the repository at this point in the history
Fix potentially overrunning write of sprintf
  • Loading branch information
0xc0170 authored Apr 26, 2023
2 parents 9a82ad6 + c958d1d commit 0ea5dec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ nsapi_error_t GEMALTO_CINTERION_CellularStack::socket_open_defer(CellularSocket
}
}
if (strcmp(paramTag, "conId") == 0) {
char buf[10];
std::sprintf(buf, "%d", _cid);
char buf[12];
std::snprintf(buf, sizeof(buf), "%d", _cid);
if (strcmp(paramValue, buf) == 0) {
foundConIdType = true;
}
Expand Down

0 comments on commit 0ea5dec

Please sign in to comment.