diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-16 01:42:28 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-16 01:42:28 +0000 |
commit | 904e69c0ec9df55ce9d7fa474c812373fce7e57a (patch) | |
tree | 62db76fd9cc0e10ce573d4bb196650193a989219 /sbin/mountd/mountd.c | |
parent | d6435246ca7a61df2f527bdf2b389f13663a4245 (diff) |
Use len+1 as the size parameter to strlcpy() since len does not include
the trailing NUL. From krw@; deraadt@ OK
Diffstat (limited to 'sbin/mountd/mountd.c')
-rw-r--r-- | sbin/mountd/mountd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index af196b116de..29673e417e2 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mountd.c,v 1.56 2003/03/14 00:51:15 deraadt Exp $ */ +/* $OpenBSD: mountd.c,v 1.57 2003/03/16 01:42:27 millert Exp $ */ /* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */ /* @@ -1103,7 +1103,7 @@ add_expdir(struct dirlist **dpp, char *cp, int len) dp->dp_right = NULL; dp->dp_flag = 0; dp->dp_hosts = NULL; - strlcpy(dp->dp_dirp, cp, len); + strlcpy(dp->dp_dirp, cp, len + 1); *dpp = dp; return (dp->dp_dirp); } |