From 2458580ac95c550217b3376c46eecb2cca646241 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 20 Oct 2013 11:52:43 -0700 Subject: Convert remaining sprintf calls to snprintf Most were fixed length or length checked anyway, this just saves time doublechecking that. (A few could be replaced by asprintf, but we don't have a copy guaranteed to be reachable from this program yet.) Signed-off-by: Alan Coopersmith Reviewed-by: Jasper St. Pierre --- expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'expr.c') diff --git a/expr.c b/expr.c index 96fd956..195e0f3 100644 --- a/expr.c +++ b/expr.c @@ -767,7 +767,7 @@ ExprResolveString(ExprDef * expr, new = (char *) uAlloc(len); if (new) { - sprintf(new, "%s%s", leftRtrn.str, rightRtrn.str); + snprintf(new, len, "%s%s", leftRtrn.str, rightRtrn.str); val_rtrn->str = new; return True; } -- cgit v1.2.3