From ff388611f461b4a4ee044ce86aedda9ce18dfc97 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Aug 2009 16:01:11 +1000 Subject: fixed support for readx greater than 64k This fixes bug 6547, where smbclient in S3 reads more than 64k at a time with readx. --- source4/ntvfs/posix/pvfs_read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs') 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, -- cgit