summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-08-04 16:01:11 +1000
committerAndrew Tridgell <tridge@samba.org>2009-08-04 16:01:11 +1000
commitff388611f461b4a4ee044ce86aedda9ce18dfc97 (patch)
treed1666adc6a27637b1ccb4d4030a32b532c0e24cb /source4/ntvfs/posix
parent3641978dfa88398dbc494845fe611dd87f2317b7 (diff)
downloadsamba-ff388611f461b4a4ee044ce86aedda9ce18dfc97.tar.gz
samba-ff388611f461b4a4ee044ce86aedda9ce18dfc97.tar.bz2
samba-ff388611f461b4a4ee044ce86aedda9ce18dfc97.zip
fixed support for readx greater than 64k
This fixes bug 6547, where smbclient in S3 reads more than 64k at a time with readx.
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index d9080d632d..75fba3c90d 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -59,8 +59,8 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
}
maxcnt = rd->readx.in.maxcnt;
- if (maxcnt > UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2) {
- maxcnt = 0;
+ if (maxcnt > 2*UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2) {
+ return NT_STATUS_INVALID_PARAMETER;
}
status = pvfs_check_lock(pvfs, f, req->smbpid,