]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Fix possible NULL pointer dereference
authorAndreas Schneider <asn@samba.org>
Tue, 23 Nov 2021 14:48:57 +0000 (15:48 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 29 Nov 2021 19:40:50 +0000 (19:40 +0000)
BUG: https://bugzilla.redhat.com/show_bug.cgi?id=2019888

Signed-off-by: Andreas Schneider <asn@samba.org>
Rewiewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 29 19:40:50 UTC 2021 on sn-devel-184

source3/winbindd/winbindd_util.c

index a8c510fafc675c1090341c413736ba92ca2bfd2a..175e05ae3ad31a5289c886bf850270b47619f1e6 100644 (file)
@@ -1784,6 +1784,9 @@ char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx,
        }
 
        tmp_user = talloc_strdup(mem_ctx, user);
+       if (tmp_user == NULL) {
+               return NULL;
+       }
        if (!strlower_m(tmp_user)) {
                TALLOC_FREE(tmp_user);
                return NULL;