From: Volker Lendecke Date: Wed, 12 Feb 2020 14:39:54 +0000 (+0100) Subject: auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL) X-Git-Tag: samba-4.10.14~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11f214df1e3e0e75985e6fdc00568ed41342ffe6;p=thirdparty%2Fsamba.git auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL) BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher (cherry picked from commit 503fc8f2ba662ecbec0788bd1710440464dc5cfd) --- diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index cdb8453b311..3e89febb74b 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -77,12 +77,13 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context, const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info) { - const char *effective_domain = user_info->mapped.domain_name; + const char *effective_domain = NULL; bool is_local_name, is_my_domain; if (!user_info || !auth_context) { return NT_STATUS_LOGON_FAILURE; } + effective_domain = user_info->mapped.domain_name; if (user_info->mapped.account_name == NULL || user_info->mapped.account_name[0] == '\0')