[edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: build failure DevicePathToText test

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Nov 25 19:12:48 UTC 2020


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 at 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67998): https://edk2.groups.io/g/devel/message/67998
Mute This Topic: https://groups.io/mt/78506956/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