summaryrefslogtreecommitdiff
path: root/cppsetup.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-05 09:55:04 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-05 09:55:04 -0800
commit3a28a2a0146c4979281ffea641dede9a32df08f9 (patch)
tree268539a149b5fa1dd582dfb35116b5b5b38b5a07 /cppsetup.c
parent639071ff3446b0df53078be1ff5820c812313aa7 (diff)
Convert more sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'cppsetup.c')
-rw-r--r--cppsetup.c2
1 files changed, 1 insertions, 1 deletions
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;