The branch, master has been updated via 5903657bd9b s3: libads: Fix return from malloc check. via 19b27299abe s3: winbind: Add missing NULL check for returned talloc'ed ADS struct. from be293a125fc ctdb-tests: Add new tool unit tests to cover UNKNOWN state
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 5903657bd9bd3b4f96b3ddf4748846465b617edf Author: Jeremy Allison <j...@samba.org> Date: Wed Jun 29 08:29:28 2022 -0700 s3: libads: Fix return from malloc check. We shouldn't be checking *realm != '\0' here, just the return from malloc. Coverity CID: 1506719. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Thu Jun 30 16:28:30 UTC 2022 on sn-devel-184 commit 19b27299abeb8287c89212099c4dbddf721778b4 Author: Jeremy Allison <j...@samba.org> Date: Wed Jun 29 08:20:21 2022 -0700 s3: winbind: Add missing NULL check for returned talloc'ed ADS struct. Coverity CID: 1506720. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/libads/ads_struct.c | 3 +-- source3/winbindd/winbindd_cm.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 164e0a30175..90634effc58 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -39,8 +39,7 @@ ADS_STATUS ads_build_path(const char *realm, *_path = NULL; r = SMB_STRDUP(realm); - - if (!r || !*r) { + if (r == NULL) { return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); } diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 64441b4db16..28316e10d72 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1099,6 +1099,10 @@ static bool dcip_check_name_ads(const struct winbindd_domain *domain, domain->name, addr, ADS_SASL_PLAIN); + if (ads == NULL) { + ads_status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY); + goto out; + } ads->auth.flags |= ADS_AUTH_NO_BIND; ads->config.flags |= request_flags; ads->server.no_fallback = true; -- Samba Shared Repository