From: Ralph Boehme Date: Thu, 22 Mar 2018 09:07:49 +0000 (+0100) Subject: s4: libcli/smb2: calculate correct credit charge for finds X-Git-Tag: ldb-1.5.0~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c68bc20f06e3e6244ef1a6b0d4b43be8ebea42;p=thirdparty%2Fsamba.git s4: libcli/smb2: calculate correct credit charge for finds Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source4/libcli/smb2/find.c b/source4/libcli/smb2/find.c index 2e0bd35f102..23ac7378212 100644 --- a/source4/libcli/smb2/find.c +++ b/source4/libcli/smb2/find.c @@ -35,6 +35,7 @@ struct smb2_request *smb2_find_send(struct smb2_tree *tree, struct smb2_find *io req = smb2_request_init_tree(tree, SMB2_OP_QUERY_DIRECTORY, 0x20, true, 0); if (req == NULL) return NULL; + req->credit_charge = (MAX(io->in.max_response_size, 1) - 1)/ 65536 + 1; SCVAL(req->out.body, 0x02, io->in.level); SCVAL(req->out.body, 0x03, io->in.continue_flags);