1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-03-04 14:07:26 +01:00 committed by Jeremy Allison
parent 2ec49cf57c
commit 3dac00b568

View File

@ -3490,7 +3490,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);