diff options
author | Jeremy Allison <jra@samba.org> | 2003-03-11 18:10:36 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-03-11 18:10:36 +0000 |
commit | 77916f652fba812287541ab0d6a5ed203852cd3d (patch) | |
tree | 6ff3401c3b5bfae7f94a2a8f3916f47b773bf45c /source3 | |
parent | 3b580ff000d9f258c581efded52d5d7c55375173 (diff) | |
download | samba-77916f652fba812287541ab0d6a5ed203852cd3d.tar.gz samba-77916f652fba812287541ab0d6a5ed203852cd3d.tar.bz2 samba-77916f652fba812287541ab0d6a5ed203852cd3d.zip |
Fix up zero termination. Spotted by Sebastian Krahmer <krahmer@suse.de>.
Jeremy.
(This used to be commit 69becdb563b2620513931811a6695481bebcceed)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/quotas.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index 9d3bfe2d64..c2f001423e 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -413,10 +413,11 @@ static BOOL nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B len=strcspn(mnttype, ":"); pathname=strstr(mnttype, ":"); - cutstr = (char *) malloc(sizeof(char) * len ); + cutstr = (char *) malloc(len+1); if (!cutstr) return False; + memset(cutstr, '\0', len+1); host = strncat(cutstr,mnttype, sizeof(char) * len ); DEBUG(5,("nfs_quotas: looking for mount on \"%s\"\n", cutstr)); DEBUG(5,("nfs_quotas: of path \"%s\"\n", mnttype)); |