summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-12-15 01:25:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:37 -0500
commit9e3453459c9166e71f483d67c04be2e49da6c561 (patch)
treecb7bfb829bf29c8502c1f772d29842c66cde847e /source3/smbd/reply.c
parent6d3abcf3ab8a4b232593529c2a79c264e3cd8d87 (diff)
downloadsamba-9e3453459c9166e71f483d67c04be2e49da6c561.tar.gz
samba-9e3453459c9166e71f483d67c04be2e49da6c561.tar.bz2
samba-9e3453459c9166e71f483d67c04be2e49da6c561.zip
r4212: Ensure we only look at the bottom bit of large_readx.
Set the 14 word version of write if size > 0xffff as well as 64-bit offset. Jeremy. (This used to be commit 94779ccb39560bf5eecab77d70f1fa04bfcf1456)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index eead0bc1a1..22cbf45e21 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2239,7 +2239,9 @@ int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
set_message(outbuf,12,0,True);
if (global_client_caps & CAP_LARGE_READX) {
- smb_maxcnt |= ((((size_t)SVAL(inbuf,smb_vwv7)) & 1 )<<16);
+ if (SVAL(inbuf,smb_vwv7) == 1) {
+ smb_maxcnt |= (1<<16);
+ }
if (smb_maxcnt > BUFFER_SIZE) {
DEBUG(0,("reply_read_and_X - read too large (%u) for reply buffer %u\n",
(unsigned int)smb_maxcnt, (unsigned int)BUFFER_SIZE));