From: Ralph Boehme Date: Tue, 12 Jan 2021 11:02:40 +0000 (+0100) Subject: libadouble: assert valid stat in ad_unconvert_get_streams() X-Git-Tag: samba-4.14.0rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84bc4b0214680f645d3e63a389cdcba1dbdaf49;p=thirdparty%2Fsamba.git libadouble: assert valid stat in ad_unconvert_get_streams() All callers already stat the path, just add a check that asserts this. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 164f0c890b2..dffc0d5b7be 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -1550,6 +1550,10 @@ static bool ad_unconvert_get_streams(struct vfs_handle_struct *handle, files_struct *fsp = NULL; NTSTATUS status; + if (!VALID_STAT(smb_fname->st)) { + return false; + } + status = openat_pathref_fsp(handle->conn->cwd_fsp, smb_fname); if (!NT_STATUS_IS_OK(status)) { return false;