diff options
author | Stefan Metzmacher <metze@samba.org> | 2021-07-05 17:49:00 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-07-15 23:04:34 +0000 |
commit | 5ecac656fde4e81aa6e51e7b3134ea3fb75f564a (patch) | |
tree | fcde7e5b22f9929e0f8f39f55e7ead61b7974ee5 | |
parent | b3c9823d907b91632679e6f0ffce1b7192e4b9b6 (diff) | |
download | samba-5ecac656fde4e81aa6e51e7b3134ea3fb75f564a.tar.gz |
s3:smbd: introduce a body_size variable in smbd_smb2_request_read_done
This will simplify the following changes.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14607
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/smbd/smb2_read.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index cd590a52c95..8372188f58d 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -116,6 +116,7 @@ static void smbd_smb2_request_read_done(struct tevent_req *subreq) { struct smbd_smb2_request *req = tevent_req_callback_data(subreq, struct smbd_smb2_request); + uint16_t body_size; DATA_BLOB outbody; DATA_BLOB outdyn; uint8_t out_data_offset; @@ -139,9 +140,10 @@ static void smbd_smb2_request_read_done(struct tevent_req *subreq) return; } - out_data_offset = SMB2_HDR_BODY + 0x10; + body_size = 0x10; + out_data_offset = SMB2_HDR_BODY + body_size; - outbody = smbd_smb2_generate_outbody(req, 0x10); + outbody = smbd_smb2_generate_outbody(req, body_size); if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { |