From: Jeremy Allison Date: Mon, 28 Jun 2021 17:20:49 +0000 (-0700) Subject: s3: VFS: fake_acls. Add missing NULL check for return of cp_smb_filename(). X-Git-Tag: tevent-0.11.0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5339048001890f4e0ea0b19fdf15f988878c735;p=thirdparty%2Fsamba.git s3: VFS: fake_acls. Add missing NULL check for return of cp_smb_filename(). Found by Coverity. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Jun 28 20:03:33 UTC 2021 on sn-devel-184 --- 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,