From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by mx.groups.io with SMTP id smtpd.web12.3864.1605081370878229484 for ; Tue, 10 Nov 2020 23:56:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=S+CghHhe; spf=pass (domain: gmx.de, ip: 212.227.15.18, mailfrom: xypron.glpk@gmx.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605081352; bh=EsE3OreSVvVrQveYSToUge+fip7XQDVPrjC27BKUgCw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=S+CghHhem0sES59uGYObsqapo8Eg/EsBmkb2EUHKgrwoq+sD3wsKp5T2WZLIS9sk1 lHAUNzNIkni54V1tqMe3ftEIUVqjSU87AVdU1ZlSkkLcrMof7Cb92ADQWOghakCbvJ jK/NeoQGsqF1tNJsuPxIhaLd5Tp/th4DFfex1qns= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from mcbin.fritz.box ([178.202.41.135]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M6UZv-1keef30Si1-006xxm; Wed, 11 Nov 2020 08:55:52 +0100 From: "Heinrich Schuchardt" To: EDK II Development Cc: Eric Jin , G Edhaya Chandran , Samer El-Haj-Mahmoud , gaoliming@byosoft.com.cn, Heinrich Schuchardt Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: illegal dereference in CheckEbcProtocol() Date: Wed, 11 Nov 2020 08:55:32 +0100 Message-Id: <20201111075532.1561-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:+n2zx1/YjHOFdQR+QEhuAC46eG27d4sDH0HR1RodAoYKRHKZuvF 0gKQYvhkfXhszxxlni6yyt9nkuELS8tbrHcUjKATMOsTis+RmkRDF9z7QFtmbOUwHvQoNR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9QyRZrQ== Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3065 If LocateProtocol() has failed, variable Ebc is not valid and we may not dereference it. Signed-off-by: Heinrich Schuchardt --- .../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBo= xTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI= /Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c index be06d139d59e..052f45b71599 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/E= fiCompliantBBTestPlatform_uefi.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/E= fiCompliantBBTestPlatform_uefi.c @@ -3162,12 +3162,6 @@ CheckEbcProtocol ( );=0D if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) {=0D AssertionType =3D EFI_TEST_ASSERTION_FAILED;=0D - if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {= =0D - GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk !=3D N= ULL);=0D - GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage !=3D N= ULL);=0D - GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterIC= acheFlush !=3D NULL);=0D - GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion !=3D NU= LL);=0D - }=0D }=0D }=0D =0D --=20 2.28.0