From: Volker Lendecke Date: Mon, 21 May 2012 12:41:40 +0000 (+0200) Subject: s3: Fix vfs_xattr_tdb.c X-Git-Tag: samba-4.0.0alpha21~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8576256;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index ee3199d277b..fc5c3de6e52 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; }