From e6b365a56582999dd6ef856fc00e777a82e2b4ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 4 Mar 2014 14:07:26 +0100 Subject: [PATCH] s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit 3dac00b568613f5a1322883237e40b98ddd1d71d) --- source3/smbd/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index f293b69f0b2..e07b40bbe36 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3499,7 +3499,7 @@ void reply_lockread(struct smb_request *req) numtoread = SVAL(req->vwv+1, 0); startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0); - numtoread = MIN(BUFFER_SIZE - (smb_size + 3*2 + 3), numtoread); + numtoread = MIN(BUFFER_SIZE - (smb_size + 5*2 + 3), numtoread); reply_outbuf(req, 5, numtoread + 3); -- 2.11.4.GIT