]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: fix crash in fill_domain_username_talloc() if specified username is NULL
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 24 Jun 2019 07:25:48 +0000 (09:25 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 3 Jul 2019 19:24:52 +0000 (19:24 +0000)
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul  3 19:24:52 UTC 2019 on sn-devel-184

source3/winbindd/winbindd_util.c

index b79f90fb0cec88ea569f6edefe92736c292d7726..cc4c3f7391ae62f30ad435e4f81d417eccbf6b5c 100644 (file)
@@ -1693,6 +1693,10 @@ char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx,
                can_assume = false;
        }
 
+       if (user == NULL) {
+               return NULL;
+       }
+
        tmp_user = talloc_strdup(mem_ctx, user);
        if (!strlower_m(tmp_user)) {
                TALLOC_FREE(tmp_user);