summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-16 03:20:49 +0200
committerVolker Lendecke <vl@samba.org>2009-09-16 03:42:36 +0200
commit444a05c28df693a745809fef73ae583a78be7c8f (patch)
tree9b686f487520b07b2daae7dc391a829a35ae8c92
parent00d7aad85a594c123d4f00dd7eb15357ed7f3495 (diff)
downloadsamba-444a05c28df693a745809fef73ae583a78be7c8f.tar.gz
samba-444a05c28df693a745809fef73ae583a78be7c8f.tar.bz2
samba-444a05c28df693a745809fef73ae583a78be7c8f.zip
s3: Fix reading beyond the end of a named stream in xattr_streams
This was found thanks to a test by Sivani from Microsoft against Samba at the SDC plugfest
-rw-r--r--source3/modules/vfs_streams_xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index ae8af47ab7..b68fa02a35 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -940,8 +940,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
/* Attempt to read past EOF. */
if (length <= offset) {
- errno = EINVAL;
- return -1;
+ return 0;
}
overlap = (offset + n) > length ? (length - offset) : n;