s3-auth: Fix a possible null pointer dereference
authorAndreas Schneider <asn@samba.org>
Fri, 17 Jul 2015 08:54:17 +0000 (10:54 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 17 Jul 2015 12:04:01 +0000 (14:04 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11404

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 17 14:04:01 CEST 2015 on sn-devel-104

source3/auth/auth_ntlmssp.c

index ef83451ac927673208b72a58cff675e28ef562d3..a0e49027af999f92dac1fcd68fc27c42ee754871 100644 (file)
@@ -198,7 +198,9 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
                                                        user_info->client.account_name,
                                                        user_info->client.domain_name,
                                                        &server_info);
-               *server_returned_info = talloc_steal(mem_ctx, server_info);
+               if (NT_STATUS_IS_OK(nt_status)) {
+                       *server_returned_info = talloc_steal(mem_ctx, server_info);
+               }
                return nt_status;
        }