diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-04 00:42:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-04 00:42:35 +0000 |
commit | daf329b1c0f01bbdd4028168949c69860a248f9e (patch) | |
tree | ca613584d0fe67c96c9239325b37011daa2ef3cc /usr.bin/awk/tran.c | |
parent | 51ea99310ccd7f074f3727add189ec97cde8b868 (diff) |
snprintf & strlcpy; tedu ok
Diffstat (limited to 'usr.bin/awk/tran.c')
-rw-r--r-- | usr.bin/awk/tran.c | 4 |
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 |