summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 112c9e6b49..eacb0fb031 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3492,10 +3492,6 @@ void reply_lockread(struct smb_request *req)
numtoread = MIN(BUFFER_SIZE - (smb_size + 5*2 + 3), numtoread);
- reply_outbuf(req, 5, numtoread + 3);
-
- data = smb_buf(req->outbuf) + 3;
-
/*
* NB. Discovered by Menny Hamburger at Mainsoft. This is a core+
* protocol request that predates the read/write lock concept.
@@ -3534,6 +3530,11 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n",
(unsigned int)sconn->smb1.negprot.max_recv));
numtoread = MIN(numtoread, sconn->smb1.negprot.max_recv);
}
+
+ reply_outbuf(req, 5, numtoread + 3);
+
+ data = smb_buf(req->outbuf) + 3;
+
nread = read_file(fsp,data,startpos,numtoread);
if (nread < 0) {