From: Andreas Schneider Date: Tue, 23 Nov 2021 14:48:57 +0000 (+0100) Subject: s3:winbind: Fix possible NULL pointer dereference X-Git-Tag: tdb-1.4.6~558 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf312f02bc86f9325fb89f6f5441bc61fd3974f;p=thirdparty%2Fsamba.git s3:winbind: Fix possible NULL pointer dereference BUG: https://bugzilla.redhat.com/show_bug.cgi?id=2019888 Signed-off-by: Andreas Schneider Rewiewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Nov 29 19:40:50 UTC 2021 on sn-devel-184 --- diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index a8c510fafc6..175e05ae3ad 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -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;