diff options
author | Jeremy Allison <jra@samba.org> | 2003-03-11 18:10:27 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-03-11 18:10:27 +0000 |
commit | 289e2e25b91da20ac02b90e5a9d6de3619ad308d (patch) | |
tree | 9e4ced008ce7c047f2b623939975905291bfa2e8 /source/smbd/quotas.c | |
parent | 7090d9f6939b3c6334fba40b0741f8f899aba31a (diff) | |
download | samba-289e2e25b91da20ac02b90e5a9d6de3619ad308d.tar.gz samba-289e2e25b91da20ac02b90e5a9d6de3619ad308d.tar.xz samba-289e2e25b91da20ac02b90e5a9d6de3619ad308d.zip |
Fix up zero termination. Spotted by Sebastian Krahmer <krahmer@suse.de>.
Jeremy.
Diffstat (limited to 'source/smbd/quotas.c')
-rw-r--r-- | source/smbd/quotas.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c index 9d3bfe2d64d..c2f001423e1 100644 --- a/source/smbd/quotas.c +++ b/source/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)); |