From: Ralf Habacker Date: Mon, 24 Jun 2019 07:25:48 +0000 (+0200) Subject: winbind: fix crash in fill_domain_username_talloc() if specified username is NULL X-Git-Tag: ldb-2.0.5~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b39c563546aed677d0ac99b9fb8b44a5b48c1e4;p=thirdparty%2Fsamba.git winbind: fix crash in fill_domain_username_talloc() if specified username is NULL Signed-off-by: Ralf Habacker Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jul 3 19:24:52 UTC 2019 on sn-devel-184 --- diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index b79f90fb0ce..cc4c3f7391a 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -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);