diff options
author | Jeremy Allison <jra@samba.org> | 2021-06-28 10:20:49 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-06-28 20:03:33 +0000 |
commit | b5339048001890f4e0ea0b19fdf15f988878c735 (patch) | |
tree | ddf585d96650067abd408b66c14c5df6ff4f535d /source3 | |
parent | c2fde31b1c2ec7482f7424f7b7cb443aae582c2e (diff) | |
download | samba-b5339048001890f4e0ea0b19fdf15f988878c735.tar.gz |
s3: VFS: fake_acls. Add missing NULL check for return of cp_smb_filename().
Found by Coverity.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jun 28 20:03:33 UTC 2021 on sn-devel-184
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_fake_acls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index 79735a81233..15cfff63f44 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -116,6 +116,11 @@ static int fake_acls_stat(vfs_handle_struct *handle, */ smb_fname_cp = cp_smb_filename(talloc_tos(), smb_fname); + if (smb_fname_cp == NULL) { + errno = ENOMEM; + return -1; + } + /* Recursion guard. */ in_openat_pathref_fsp = true; status = openat_pathref_fsp(handle->conn->cwd_fsp, |