summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-07 06:04:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-07 06:04:26 +0000
commit082cfbbed6f925f88244d0cd65de0dede9f7f012 (patch)
tree9625e3af23d6c180dd25eb7bf2afa39392a0e6ab /usr.sbin
parent333ef11cb24bbfa6517989d357ca61c5e76ac75b (diff)
buf oflow
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bootpd/bootpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bootpd/bootpd.c b/usr.sbin/bootpd/bootpd.c
index 0fa103135ca..7192f5c846b 100644
--- a/usr.sbin/bootpd/bootpd.c
+++ b/usr.sbin/bootpd/bootpd.c
@@ -21,7 +21,7 @@ SOFTWARE.
************************************************************************/
#ifndef lint
-static char rcsid[] = "$Id: bootpd.c,v 1.3 1996/07/11 10:54:50 mickey Exp $";
+static char rcsid[] = "$Id: bootpd.c,v 1.4 1998/06/07 06:04:25 deraadt Exp $";
#endif
/*
@@ -812,7 +812,8 @@ HW addr type is IEEE 802. convert to %s and check again\n",
* daemon chroot directory (i.e. /tftpboot).
*/
if (hp->flags.tftpdir) {
- strcpy(realpath, hp->tftpdir->string);
+ strncpy(realpath, hp->tftpdir->string, sizeof realpath-1);
+ realpath[sizeof realpath-1] = '\0';
clntpath = &realpath[strlen(realpath)];
} else {
realpath[0] = '\0';