diff options
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/negprot.c | 2 | ||||
-rw-r--r-- | source4/smb_server/smb2/receive.c | 3 | ||||
-rw-r--r-- | source4/smb_server/smb2/tcon.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c index 2aca91adf8..8aa652e27e 100644 --- a/source4/smb_server/smb2/negprot.c +++ b/source4/smb_server/smb2/negprot.c @@ -196,7 +196,7 @@ void smb2srv_reply_smb_negprot(struct smbsrv_request *smb_req) req->in.size = NBT_HDR_SIZE+SMB2_HDR_BODY+body_fixed_size; req->in.allocated = req->in.size; - req->in.buffer = talloc_size(req, req->in.allocated); + req->in.buffer = talloc_array(req, uint8_t, req->in.allocated); if (!req->in.buffer) goto nomem; req->in.hdr = req->in.buffer + NBT_HDR_SIZE; req->in.body = req->in.hdr + SMB2_HDR_BODY; diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c index 6a36d2f365..e783620e52 100644 --- a/source4/smb_server/smb2/receive.c +++ b/source4/smb_server/smb2/receive.c @@ -82,7 +82,8 @@ NTSTATUS smb2srv_setup_reply(struct smb2srv_request *req, uint16_t body_fixed_si req->out.size = SMB2_HDR_BODY+NBT_HDR_SIZE+body_fixed_size; req->out.allocated = req->out.size + body_dynamic_size; - req->out.buffer = talloc_size(req, req->out.allocated); + req->out.buffer = talloc_array(req, uint8_t, + req->out.allocated); NT_STATUS_HAVE_NO_MEMORY(req->out.buffer); req->out.hdr = req->out.buffer + NBT_HDR_SIZE; diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c index b476e97168..6d7e19e470 100644 --- a/source4/smb_server/smb2/tcon.c +++ b/source4/smb_server/smb2/tcon.c @@ -41,7 +41,8 @@ static NTSTATUS smb2srv_send_oplock_break(void *p, struct ntvfs_handle *h, uint8 req = smb2srv_init_request(handle->tcon->smb_conn); NT_STATUS_HAVE_NO_MEMORY(req); - req->in.buffer = talloc_size(req, NBT_HDR_SIZE + SMB2_MIN_SIZE); + req->in.buffer = talloc_array(req, uint8_t, + NBT_HDR_SIZE + SMB2_MIN_SIZE); NT_STATUS_HAVE_NO_MEMORY(req->in.buffer); req->in.size = NBT_HDR_SIZE + SMB2_MIN_SIZE; req->in.allocated = req->in.size; |