s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Mar 2014 13:07:26 +0000 (14:07 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 1 Apr 2014 07:26:38 +0000 (09:26 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 3dac00b568613f5a1322883237e40b98ddd1d71d)

source3/smbd/reply.c

index 6b926fb1116671833c91150c448c5a56a664e1a7..35d42e84bcea50e572531478a45d0b4ada56736a 100644 (file)
@@ -3500,7 +3500,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);