git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00d7aad
)
s3: Fix reading beyond the end of a named stream in xattr_streams
author
Volker Lendecke
<vl@samba.org>
Wed, 16 Sep 2009 01:20:49 +0000
(
03:20
+0200)
committer
Volker Lendecke
<vl@samba.org>
Wed, 16 Sep 2009 01:42:36 +0000
(
03:42
+0200)
This was found thanks to a test by Sivani from Microsoft against Samba at the
SDC plugfest
source3/modules/vfs_streams_xattr.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_streams_xattr.c
b/source3/modules/vfs_streams_xattr.c
index ae8af47ab732cf3f0807039d7afaab1fd4accd3d..b68fa02a354af98e4980108bd269e13e71327011 100644
(file)
--- 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;