diff options
author | Jeremy Allison <jra@samba.org> | 2022-09-07 11:12:08 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-09-15 18:43:32 +0000 |
commit | a213a371aeb2fae4df0f41e85faca2cfd38f6447 (patch) | |
tree | 705ef7ad67ba6112c06f3f53d129051c64bd8fa4 /source3 | |
parent | 95bd776d2a3167467f5ad9249049d982848886e3 (diff) | |
download | samba-a213a371aeb2fae4df0f41e85faca2cfd38f6447.tar.gz |
s3: libsmb: Add missing memory allocation fail checks in cli_ntcreate1_send().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clifile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 4cc9f231c37..86a6b58a6ed 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -2505,9 +2505,15 @@ static struct tevent_req *cli_ntcreate1_send(TALLOC_CTX *mem_ctx, SCVAL(vwv+23, 1, SecurityFlags); bytes = talloc_array(state, uint8_t, 0); + if (tevent_req_nomem(bytes, req)) { + return tevent_req_post(req, ev); + } bytes = smb_bytes_push_str(bytes, smbXcli_conn_use_unicode(cli->conn), fname, strlen(fname)+1, &converted_len); + if (tevent_req_nomem(bytes, req)) { + return tevent_req_post(req, ev); + } if (clistr_is_previous_version_path(fname, NULL, NULL, NULL)) { additional_flags2 = FLAGS2_REPARSE_PATH; |