[Pkg-samba-maint] [samba] 15/29: vfs: Fix building the glusterfs module.
Jelmer Vernooij
jelmer at moszumanska.debian.org
Fri Dec 6 23:16:45 UTC 2013
This is an automated email from the git hooks/post-receive script.
jelmer pushed a commit to branch samba_4.1
in repository samba.
commit 289b7fa7492c3cec757d8fe03a51e384c60ce9b8
Author: Andreas Schneider <asn at samba.org>
Date: Mon Nov 4 12:32:04 2013 +0100
vfs: Fix building the glusterfs module.
Using calloc directly throws an error. This fixes building the glusterfs
module.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
(cherry picked from commit 25d62dda5c64aefeab0059d9437756f8aaec5397)
---
source3/modules/vfs_glusterfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 237236a..c944276 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -707,12 +707,12 @@ static char *vfs_gluster_getwd(struct vfs_handle_struct *handle)
char *cwd;
char *ret;
- cwd = calloc(1, PATH_MAX + 1);
+ cwd = SMB_CALLOC_ARRAY(char, PATH_MAX);
if (cwd == NULL) {
return NULL;
}
- ret = glfs_getcwd(handle->data, cwd, PATH_MAX);
+ ret = glfs_getcwd(handle->data, cwd, PATH_MAX - 1);
if (ret == 0) {
free(cwd);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list