diff options
author | Volker Lendecke <vl@samba.org> | 2009-09-16 03:20:49 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-10-20 15:00:18 +0200 |
commit | a6c06024a836425ad155d9380a3e62ab069d2e1c (patch) | |
tree | 95f05a5017ea0318df7e7058613c425b244280f1 | |
parent | 20894847f146939f1d3f726a238d8bfb9bd9a842 (diff) | |
download | samba-a6c06024a836425ad155d9380a3e62ab069d2e1c.tar.gz |
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
(cherry picked from commit 444a05c28df693a745809fef73ae583a78be7c8f)
Fix bug #6731.
(cherry picked from commit ff9355149c9af7ca0e31b36690b270a03cb787fc)
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 3d5478d7a25..c5a7c697da2 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -867,8 +867,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; |