diff options
author | Volker Lendecke <vl@samba.org> | 2009-09-16 03:20:49 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-09-16 03:42:36 +0200 |
commit | 444a05c28df693a745809fef73ae583a78be7c8f (patch) | |
tree | 9b686f487520b07b2daae7dc391a829a35ae8c92 /source3/modules | |
parent | 00d7aad85a594c123d4f00dd7eb15357ed7f3495 (diff) | |
download | samba-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
Diffstat (limited to 'source3/modules')
-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 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; |