diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2019-06-24 09:25:48 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-07-03 19:24:52 +0000 |
commit | 1b39c563546aed677d0ac99b9fb8b44a5b48c1e4 (patch) | |
tree | f9ca74074e857b70b9ebc2ca757b596ac7206654 /source3/winbindd | |
parent | 4992c9bbbb86fa688907ab585cf8799c6f9a1c8a (diff) | |
download | samba-1b39c563546aed677d0ac99b9fb8b44a5b48c1e4.tar.gz |
winbind: fix crash in fill_domain_username_talloc() if specified username is NULL
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
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |