* [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText test
@ 2020-11-25 19:12 Heinrich Schuchardt
2020-11-30 12:59 ` G Edhaya Chandran
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-11-25 19:12 UTC (permalink / raw)
To: G Edhaya Chandran
Cc: EDK II Development, Eric Jin, Samer El-Haj-Mahmoud, Barton Gao,
Heinrich Schuchardt
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3029
After commit 75c92b85bf9b ("uefi-sct/SctPkg: NULL deref in DevicePathToText
test") a build failure was observed.
Length is a field in MEDIA_OFFSET_DEVICE_PATH.Header and not in
MEDIA_OFFSET_DEVICE_PATH itself.
Fixes: 75c92b85bf9b ("uefi-sct/SctPkg: NULL deref in DevicePathToText test")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
.../BlackBoxTest/DevicePathToTextBBTestCoverage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestCoverage.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestCoverage.c
index eb77c3564e95..e83d570662c2 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestCoverage.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestCoverage.c
@@ -1200,7 +1200,7 @@ DevicePathToTextConvertDeviceNodeToTextCoverageTest (
pDeviceNode2 = SctConvertTextToDeviceNode(Text);
SctPrint(L"pDeviceNode2 = %p\n", pDeviceNode2);
if (pDeviceNode2 &&
- ((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Length ==
+ ((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Header.Length ==
sizeof(MEDIA_OFFSET_DEVICE_PATH)) {
((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Reserved = 0;
}
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText test
2020-11-25 19:12 [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText test Heinrich Schuchardt
@ 2020-11-30 12:59 ` G Edhaya Chandran
0 siblings, 0 replies; 2+ messages in thread
From: G Edhaya Chandran @ 2020-11-30 12:59 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: EDK II Development, Eric Jin, Samer El-Haj-Mahmoud, Barton Gao
Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
Upstreamed by the commit-id : fb0e695747e2cb45580f7cc3277cda39fa363ed3
With Warm Regards,
Edhay
> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: 26 November 2020 00:43
> To: G Edhaya Chandran <Edhaya.Chandran@arm.com>
> Cc: EDK II Development <devel@edk2.groups.io>; Eric Jin <eric.jin@intel.com>;
> Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Barton Gao
> <gaojie@byosoft.com.cn>; Heinrich Schuchardt <xypron.glpk@gmx.de>
> Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText
> test
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3029
>
> After commit 75c92b85bf9b ("uefi-sct/SctPkg: NULL deref in DevicePathToText
> test") a build failure was observed.
>
> Length is a field in MEDIA_OFFSET_DEVICE_PATH.Header and not in
> MEDIA_OFFSET_DEVICE_PATH itself.
>
> Fixes: 75c92b85bf9b ("uefi-sct/SctPkg: NULL deref in DevicePathToText test")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> .../BlackBoxTest/DevicePathToTextBBTestCoverage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/Device
> PathToTextBBTestCoverage.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/Device
> PathToTextBBTestCoverage.c
> index eb77c3564e95..e83d570662c2 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/Device
> PathToTextBBTestCoverage.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackB
> +++ oxTest/DevicePathToTextBBTestCoverage.c
> @@ -1200,7 +1200,7 @@
> DevicePathToTextConvertDeviceNodeToTextCoverageTest (
> pDeviceNode2 = SctConvertTextToDeviceNode(Text);
> SctPrint(L"pDeviceNode2 = %p\n", pDeviceNode2);
> if (pDeviceNode2 &&
> - ((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Length ==
> + ((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Header.Length ==
> sizeof(MEDIA_OFFSET_DEVICE_PATH)) {
> ((MEDIA_OFFSET_DEVICE_PATH *)pDeviceNode2)->Reserved = 0;
> }
> --
> 2.29.2
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-30 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-25 19:12 [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText test Heinrich Schuchardt
2020-11-30 12:59 ` G Edhaya Chandran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox