diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-02-05 14:47:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-02-05 14:47:18 +0000 |
commit | 6a6b2b73f708e482081da6ea62172bf5abda9464 (patch) | |
tree | 5106d33c2c23743f64b979caa430289a88978854 | |
parent | 34d8a551528a9fae8e89c85feafd082ac2fd0f62 (diff) |
sprintf purge
-rw-r--r-- | usr.sbin/ypserv/makedbm/makedbm.c | 8 | ||||
-rw-r--r-- | usr.sbin/ypserv/mkalias/mkalias.c | 6 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr.c | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index 6fa2407c7c6..dd60aab062f 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makedbm.c,v 1.13 1999/04/22 17:43:10 deraadt Exp $ */ +/* $OpenBSD: makedbm.c,v 1.14 2001/02/05 14:47:16 deraadt Exp $ */ /* * Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: makedbm.c,v 1.13 1999/04/22 17:43:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: makedbm.c,v 1.14 2001/02/05 14:47:16 deraadt Exp $"; #endif #include <stdio.h> @@ -126,14 +126,14 @@ file_date(filename) int status; if (strcmp(filename,"-") == 0) { - sprintf(datestr, "%010d", time(0)); + snprintf(datestr, sizeof datestr, "%010u", time(0)); } else { status = stat(filename, &finfo); if (status < 0) { fprintf(stderr, "%s: can't stat %s\n", __progname, filename); exit(1); } - sprintf(datestr, "%010d", finfo.st_mtime); + snprintf(datestr, sizeof datestr, "%010u", finfo.st_mtime); } return datestr; } diff --git a/usr.sbin/ypserv/mkalias/mkalias.c b/usr.sbin/ypserv/mkalias/mkalias.c index 3ff9de4d1f9..31f2f0ac4fe 100644 --- a/usr.sbin/ypserv/mkalias/mkalias.c +++ b/usr.sbin/ypserv/mkalias/mkalias.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkalias.c,v 1.5 1998/07/09 06:33:04 deraadt Exp $ */ +/* $OpenBSD: mkalias.c,v 1.6 2001/02/05 14:47:17 deraadt Exp $ */ /* * Copyright (c) 1997 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: mkalias.c,v 1.5 1998/07/09 06:33:04 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mkalias.c,v 1.6 2001/02/05 14:47:17 deraadt Exp $"; #endif #include <ctype.h> @@ -325,7 +325,7 @@ fail: } if (new_db != NULL) { - sprintf(datestr, "%010d", time(NULL)); + snprintf(datestr, sizeof datestr, "%010u", time(NULL)); key.dptr = YP_LAST_KEY; key.dsize = strlen(YP_LAST_KEY); val.dptr = datestr; diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c index 11b6f6205e2..21de65e044a 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.c +++ b/usr.sbin/ypserv/ypxfr/ypxfr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypxfr.c,v 1.24 1998/02/14 10:05:27 maja Exp $ */ +/* $OpenBSD: ypxfr.c,v 1.25 2001/02/05 14:47:17 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.24 1998/02/14 10:05:27 maja Exp $"; +static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.25 2001/02/05 14:47:17 deraadt Exp $"; #endif #include <sys/types.h> @@ -236,7 +236,7 @@ u_int32_t ordernum; char keystr[] = YP_LAST_KEY; int status; - sprintf(datestr, "%010u", ordernum); + snprintf(datestr, sizeof datestr, "%010u", ordernum); key.dptr = keystr; key.dsize = strlen(keystr); |