From 6a6b2b73f708e482081da6ea62172bf5abda9464 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 5 Feb 2001 14:47:18 +0000 Subject: sprintf purge --- usr.sbin/ypserv/makedbm/makedbm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/ypserv/makedbm') 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 @@ -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 @@ -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; } -- cgit v1.2.3