Skip to content

Commit

Permalink
Use correct max size in strftime to avoid possible out of range access
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord authored Dec 25, 2023
1 parent 238ac6c commit bcb7932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/logMsg/logMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,7 @@ LmStatus lmFdRegister
char dt[128];
int sz;

strftime(dt, 256, "%A %d %h %H:%M:%S %Y", &tmP);
strftime(dt, 128, "%A %d %h %H:%M:%S %Y", &tmP);
snprintf(startMsg, sizeof(startMsg),
"%s log\n-----------------\nStarted %s\nCleared at ...\n",
progName, dt);
Expand Down

0 comments on commit bcb7932

Please sign in to comment.