1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

s3:smbd: fix the maxentries calculation depending on the max_send.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-03-05 14:03:42 +01:00 committed by Jeremy Allison
parent 734e1b6504
commit c899d4fd9c

View File

@ -1699,7 +1699,7 @@ void reply_search(struct smb_request *req)
} else {
unsigned int i;
size_t hdr_size = ((uint8_t *)smb_buf(req->outbuf) + 3 - req->outbuf);
size_t available_space = BUFFER_SIZE - hdr_size;
size_t available_space = sconn->smb1.sessions.max_send - hdr_size;
maxentries = MIN(maxentries, available_space/DIR_STRUCT_SIZE);