diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-07 06:04:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-07 06:04:26 +0000 |
commit | 082cfbbed6f925f88244d0cd65de0dede9f7f012 (patch) | |
tree | 9625e3af23d6c180dd25eb7bf2afa39392a0e6ab | |
parent | 333ef11cb24bbfa6517989d357ca61c5e76ac75b (diff) |
buf oflow
-rw-r--r-- | usr.sbin/bootpd/bootpd.c | 5 |
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'; |