diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-14 00:51:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-14 00:51:16 +0000 |
commit | 268eb0e45c9416696d8f09cd08fa697c6666fc60 (patch) | |
tree | 2229a759a8e022ccf42cc5f910ddc97d20a806e4 /sbin | |
parent | 0596009da3c2f5570c42b308f42df9ef9a19769f (diff) |
tweak; millert ok
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mountd/mountd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index bb5f6026889..af196b116de 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mountd.c,v 1.55 2003/03/13 09:09:26 deraadt Exp $ */ +/* $OpenBSD: mountd.c,v 1.56 2003/03/14 00:51:15 deraadt Exp $ */ /* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */ /* @@ -1095,14 +1095,15 @@ add_expdir(struct dirlist **dpp, char *cp, int len) { struct dirlist *dp; - dp = (struct dirlist *)malloc(sizeof (struct dirlist) + len + 1); + /* do not need +1 because of dp_dirp[1] */ + dp = (struct dirlist *)malloc(sizeof (struct dirlist) + len); if (dp == NULL) out_of_mem(); dp->dp_left = *dpp; dp->dp_right = NULL; dp->dp_flag = 0; dp->dp_hosts = NULL; - strlcpy(dp->dp_dirp, cp, len); /* might be 1 byte extra */ + strlcpy(dp->dp_dirp, cp, len); *dpp = dp; return (dp->dp_dirp); } |