]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libadouble: assert valid stat in ad_unconvert_get_streams()
authorRalph Boehme <slow@samba.org>
Tue, 12 Jan 2021 11:02:40 +0000 (12:02 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 14 Jan 2021 17:55:33 +0000 (17:55 +0000)
All callers already stat the path, just add a check that asserts this.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c

index 164f0c890b2027b86418e5bfe38df91609d2681d..dffc0d5b7be6e0b585ba8eef45c5a0969e9eba6e 100644 (file)
@@ -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;