summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h1
-rw-r--r--source3/smbd/smb2_server.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 15fc01272e..f5962717f1 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -615,6 +615,7 @@ struct smbd_smb2_request {
int vector_count;
#define OUTVEC_ALLOC_SIZE (SMB2_HDR_BODY + 9)
uint8_t _hdr[OUTVEC_ALLOC_SIZE];
+ uint8_t _body[0x58];
} out;
};
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 7fbaf485d7..becbbed664 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -922,6 +922,12 @@ static void smb2_calculate_credits(const struct smbd_smb2_request *inreq,
DATA_BLOB smbd_smb2_generate_outbody(struct smbd_smb2_request *req, size_t size)
{
+ if (req->current_idx <= 1) {
+ if (size <= sizeof(req->out._body)) {
+ return data_blob_const(req->out._body, size);
+ }
+ }
+
return data_blob_talloc(req->out.vector, NULL, size);
}