From 3a28a2a0146c4979281ffea641dede9a32df08f9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 5 Jan 2013 09:55:04 -0800 Subject: Convert more sprintf calls to snprintf Signed-off-by: Alan Coopersmith --- cppsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cppsetup.c') diff --git a/cppsetup.c b/cppsetup.c index ab00069..58e2a12 100644 --- a/cppsetup.c +++ b/cppsetup.c @@ -45,7 +45,7 @@ my_if_errors (IfParser *ip, const char *cp, const char *expecting) int prefixlen; int i; - sprintf (prefix, "\"%s\":%d", filename, lineno); + snprintf (prefix, sizeof(prefix), "\"%s\":%d", filename, lineno); prefixlen = strlen(prefix); fprintf (stderr, "%s: %s", prefix, pd->line); i = cp - pd->line; -- cgit v1.2.3