From 857625673833ddfa3897ce30def118cb593865b6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 21 May 2012 14:41:40 +0200 Subject: s3: Fix vfs_xattr_tdb.c "size" is the maximum buffer, only copy what we actually got. For me, this fixes valgrind errors in the DIR1 test that might potentially make DIR1 non-flaky again. Signed-off-by: Jeremy Allison Autobuild-User: Jeremy Allison Autobuild-Date: Mon May 21 22:10:15 CEST 2012 on sn-devel-104 --- source3/modules/vfs_xattr_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/modules/vfs_xattr_tdb.c') diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index ee3199d277..fc5c3de6e5 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -57,7 +57,7 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, errno = ERANGE; return -1; } - memcpy(value, blob.data, size); + memcpy(value, blob.data, xattr_size); return xattr_size; } -- cgit