Use snprintf in favor of sprintf almost everywhere.
All checks were successful
Remind unit tests / tests (push) Successful in 35s

This commit is contained in:
Dianne Skoll
2025-01-22 11:11:08 -05:00
parent 3dcd353fb5
commit 8d09abc363
9 changed files with 95 additions and 79 deletions

View File

@@ -702,7 +702,7 @@ static int CalculateNextTimeUsingSched(QueuedRem *q)
to be a security hole! */
while(1) {
char exprBuf[VAR_NAME_LEN+32];
sprintf(exprBuf, "%s(%d)", q->sched, q->ntrig);
snprintf(exprBuf, sizeof(exprBuf), "%s(%d)", q->sched, q->ntrig);
s = exprBuf;
r = EvalExpr(&s, &v, NULL);
if (r) {