summaryrefslogtreecommitdiff
path: root/main.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 /main.c
parent639071ff3446b0df53078be1ff5820c812313aa7 (diff)
downloadxorg-util-makedepend-3a28a2a0146c4979281ffea641dede9a32df08f9.tar.gz
Convert more sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 12efb46..2db9ec6 100644
--- a/main.c
+++ b/main.c
@@ -743,7 +743,7 @@ redirect(const char *line, const char *makefile)
stat(makefile, &st);
if ((fdin = fopen(makefile, "r")) == NULL)
fatalerr("cannot open \"%s\"\n", makefile);
- sprintf(backup, "%s.bak", makefile);
+ snprintf(backup, sizeof(backup), "%s.bak", makefile);
unlink(backup);
#if defined(WIN32) || defined(__CYGWIN__)
fclose(fdin);