summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 09:09:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 09:09:33 +0000
commit79c512971e63b9113a378f3d82f239e6518a390b (patch)
tree60a70a4351b5c752d36c6be85e06dfe53d24dfde /usr.sbin/inetd/inetd.c
parent81ed744a68ae422432934fb4032bbb35f4b0862d (diff)
more strcpy/sprintf death; mpech ok
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 957d65e1137..83942678bca 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.89 2002/03/14 16:44:25 mpech Exp $ */
+/* $OpenBSD: inetd.c,v 1.90 2002/05/22 09:09:32 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.89 2002/03/14 16:44:25 mpech Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.90 2002/05/22 09:09:32 deraadt Exp $";
#endif /* not lint */
/*
@@ -1998,7 +1998,7 @@ daytime_stream(s, sep) /* Return human-readable time of day */
clock = time(NULL);
- (void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
+ (void) snprintf(buffer, sizeof buffer, "%.24s\r\n", ctime(&clock));
(void) write(s, buffer, strlen(buffer));
}
@@ -2021,7 +2021,7 @@ daytime_dg(s, sep) /* Return human-readable time of day */
return;
if (dg_badinput((struct sockaddr *)&ss))
return;
- (void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
+ (void) snprintf(buffer, sizeof buffer, "%.24s\r\n", ctime(&clock));
(void) sendto(s, buffer, strlen(buffer), 0, (struct sockaddr *)&ss,
size);
}