summaryrefslogtreecommitdiff
path: root/usr.bin/awk/tran.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 00:42:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 00:42:35 +0000
commitdaf329b1c0f01bbdd4028168949c69860a248f9e (patch)
treeca613584d0fe67c96c9239325b37011daa2ef3cc /usr.bin/awk/tran.c
parent51ea99310ccd7f074f3727add189ec97cde8b868 (diff)
snprintf & strlcpy; tedu ok
Diffstat (limited to 'usr.bin/awk/tran.c')
-rw-r--r--usr.bin/awk/tran.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/awk/tran.c b/usr.bin/awk/tran.c
index 71dd01356ff..f7f8440b503 100644
--- a/usr.bin/awk/tran.c
+++ b/usr.bin/awk/tran.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tran.c,v 1.8 2002/12/19 21:24:28 millert Exp $ */
+/* $OpenBSD: tran.c,v 1.9 2003/04/04 00:42:34 deraadt Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -107,7 +107,7 @@ void arginit(int ac, char **av) /* set up ARGV and ARGC */
ARGVtab = makesymtab(NSYMTAB); /* could be (int) ARGC as well */
cp->sval = (char *) ARGVtab;
for (i = 0; i < ac; i++) {
- sprintf(temp, "%d", i);
+ snprintf(temp, sizeof temp, "%d", i);
if (is_number(*av))
setsymtab(temp, *av, atof(*av), STR|NUM, ARGVtab);
else