From: Stefan Metzmacher Date: Tue, 7 Aug 2012 10:56:23 +0000 (+0200) Subject: s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ X-Git-Tag: ldb-1.1.10~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfc87a4a76294b26f6031547e18228afd4d535e5;p=thirdparty%2Fsamba.git s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ metze --- diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index acc998bfd0a..9766d48f725 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -2038,7 +2038,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req) } /* I am a sick, sick man... :-). Sendfile hack ... JRA. */ - if (req->out.vector_count == 4 && + if (req->out.vector_count < (2*SMBD_SMB2_NUM_IOV_PER_REQ) && outdyn->iov_base == NULL && outdyn->iov_len != 0) { /* Dynamic part is NULL. Chop it off, We're going to send it via sendfile. */