From: Pavel Filipenský Date: Mon, 10 Jan 2022 12:24:22 +0000 (+0100) Subject: s3:libnet: Fix dereference of NULL win7 X-Git-Tag: tdb-1.4.6~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e649846348ad6ce451b32ab534ac0030ccc7c0f;p=thirdparty%2Fsamba.git s3:libnet: Fix dereference of NULL win7 Found by covscan. Pair-Programmed-With: Andreas Schneider Signed-off-by: Pavel Filipenský Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/source3/libnet/libnet_join_offline.c b/source3/libnet/libnet_join_offline.c index 33380207209..d1317ddfbea 100644 --- a/source3/libnet/libnet_join_offline.c +++ b/source3/libnet/libnet_join_offline.c @@ -175,6 +175,9 @@ static WERROR libnet_odj_compose_OP_PACKAGE_PART(TALLOC_CTX *mem_ctx, switch (level) { case 1: /* ODJ_GUID_JOIN_PROVIDER */ + if (win7 == NULL) { + return WERR_INVALID_PARAMETER; + } p->Part->win7blob = *win7; break; case 2: /* ODJ_GUID_JOIN_PROVIDER2 */