diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_xattr_tdb.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index b32fbc1e9eb..58acf446d2e 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -85,6 +85,12 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, TALLOC_FREE(frame); return -1; } + + if (size == 0) { + TALLOC_FREE(frame); + return xattr_size; + } + if (blob.length > size) { TALLOC_FREE(frame); errno = ERANGE; @@ -125,6 +131,12 @@ static ssize_t xattr_tdb_fgetxattr(struct vfs_handle_struct *handle, TALLOC_FREE(frame); return -1; } + + if (size == 0) { + TALLOC_FREE(frame); + return xattr_size; + } + if (blob.length > size) { TALLOC_FREE(frame); errno = ERANGE; |