[edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: illegal dereference in CheckEbcProtocol()

Samer El-Haj-Mahmoud samer.el-haj-mahmoud at arm.com
Wed Nov 11 14:02:35 UTC 2020


Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud at arm.com>


> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Sent: Wednesday, November 11, 2020 2:56 AM
> To: EDK II Development <devel at edk2.groups.io>
> Cc: Eric Jin <eric.jin at intel.com>; G Edhaya Chandran
> <Edhaya.Chandran at arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud at arm.com>; gaoliming at byosoft.com.cn; Heinrich Schuchardt
> <xypron.glpk at gmx.de>
> Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: illegal dereference in
> CheckEbcProtocol()
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3065
>
> If LocateProtocol() has failed, variable Ebc is not valid and we may not
> dereference it.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  .../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c          | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli
> antBBTestPlatform_uefi.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli
> antBBTestPlatform_uefi.c
> index be06d139d59e..052f45b71599 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli
> antBBTestPlatform_uefi.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli
> antBBTestPlatform_uefi.c
> @@ -3162,12 +3162,6 @@ CheckEbcProtocol (
>                          );
>
>      if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
>
>        AssertionType = EFI_TEST_ASSERTION_FAILED;
>
> -      if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
>
> -        GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk !=
> NULL);
>
> -        GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage !=
> NULL);
>
> -        GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc-
> >RegisterICacheFlush != NULL);
>
> -        GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion !=
> NULL);
>
> -      }
>
>      }
>
>    }
>
>
>
> --
> 2.28.0

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67285): https://edk2.groups.io/g/devel/message/67285
Mute This Topic: https://groups.io/mt/78178670/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list