summaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkheaders.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:46:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:46:21 +0000
commitef1b3f9682539a42c2f5cd67e47ef048adb5f498 (patch)
tree5c884e8d5b01bfdc3d2e97ca2e4359449cce652b /usr.sbin/config/mkheaders.c
parentb19caa201f0c1b7d209365f918f8322db3d568f1 (diff)
more snprintf
Diffstat (limited to 'usr.sbin/config/mkheaders.c')
-rw-r--r--usr.sbin/config/mkheaders.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c
index 376e4baac25..8d067d0f999 100644
--- a/usr.sbin/config/mkheaders.c
+++ b/usr.sbin/config/mkheaders.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkheaders.c,v 1.12 2002/03/14 16:44:24 mpech Exp $ */
+/* $OpenBSD: mkheaders.c,v 1.13 2002/05/29 09:45:39 deraadt Exp $ */
/* $NetBSD: mkheaders.c,v 1.12 1997/02/02 21:12:34 thorpej Exp $ */
/*
@@ -93,7 +93,7 @@ emitcnt(head)
char buf[BUFSIZ];
char fname[BUFSIZ];
- (void)sprintf(fname, "%s.h", head->nv_name);
+ (void)snprintf(fname, sizeof fname, "%s.h", head->nv_name);
if ((fp = fopen(fname, "r")) == NULL)
goto writeit;
nv = head;
@@ -153,7 +153,7 @@ emitopt(nv)
/*
* Compare the new file to the old.
*/
- sprintf(fname, "opt_%s.h", nv->nv_name);
+ snprintf(fname, sizeof fname, "opt_%s.h", nv->nv_name);
if ((fp = fopen(fname, "r")) == NULL)
goto writeit;
nlines = 0;