From 91a306eee79353de56e5c2526a66c4619f283ce1 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 26 May 2009 01:49:53 +0000 Subject: [PATCH] Correct the check to the valid device path. The device path can't be less than the basic header. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8381 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 90c67d87c6..d5ef60b7f5 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -147,7 +147,7 @@ GetDevicePath ( // DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DevicePathBuffer; while (!IsDevicePathEnd (DevicePath)) { - if ((DevicePath->Type == 0) || (DevicePath->SubType == 0) || (DevicePathNodeLength (DevicePath) > sizeof (EFI_DEV_PATH))) { + if ((DevicePath->Type == 0) || (DevicePath->SubType == 0) || (DevicePathNodeLength (DevicePath) < sizeof (EFI_DEVICE_PATH_PROTOCOL))) { // // Invalid device path // -- 2.39.2