From 1b39c563546aed677d0ac99b9fb8b44a5b48c1e4 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 24 Jun 2019 09:25:48 +0200 Subject: [PATCH] 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 --- source3/winbindd/winbindd_util.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.3