diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-05 14:03:42 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-04-01 09:08:06 +0200 |
commit | a42b892a7188e995a62f34f451098d11e2db1f7c (patch) | |
tree | 84c1a2ff3239c967cd4742053dd49704be2bbeb3 | |
parent | 03f9c6123ac5c283c4933cd292c68ea55b6b27c1 (diff) | |
download | samba-a42b892a7188e995a62f34f451098d11e2db1f7c.tar.gz |
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>
(cherry picked from commit c899d4fd9c5a337ab82acdf11866df50fb0629e0)
-rw-r--r-- | source3/smbd/reply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 2dea74daf63..adf4b6fe677 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1698,7 +1698,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); |