]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Fix a possibile null pointer dereference
authorAndreas Schneider <asn@samba.org>
Mon, 15 Jun 2020 08:32:49 +0000 (10:32 +0200)
committerIsaac Boukris <iboukris@sn-devel-184>
Tue, 16 Jun 2020 09:08:34 +0000 (09:08 +0000)
Found by clang.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
source3/smbd/open.c

index 286f1b8e6f7a6162083ce7de9403b93a41fffc69..8f6d293c06fbecbce17dfd25134fea980ebfbb91 100644 (file)
@@ -6024,7 +6024,7 @@ NTSTATUS create_file_default(connection_struct *conn,
 
                fake_file_type = is_fake_file(smb_fname);
 
-               if (fake_file_type != FAKE_FILE_TYPE_NONE) {
+               if (req != NULL && fake_file_type != FAKE_FILE_TYPE_NONE) {
 
                        /*
                         * Here we go! support for changing the disk quotas