]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Correct the check to the valid device path. The device path can't be less than the...
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 May 2009 01:49:53 +0000 (01:49 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 May 2009 01:49:53 +0000 (01:49 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8381 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c

index 90c67d87c6a7a779af8c848a7637083dddfaca52..d5ef60b7f5ed3eb223d96c60123df4b3bb319351 100644 (file)
@@ -147,7 +147,7 @@ GetDevicePath (
   //\r
   DevicePath  = (EFI_DEVICE_PATH_PROTOCOL *) DevicePathBuffer;\r
   while (!IsDevicePathEnd (DevicePath)) {\r
-    if ((DevicePath->Type == 0) || (DevicePath->SubType == 0) || (DevicePathNodeLength (DevicePath) > sizeof (EFI_DEV_PATH))) {\r
+    if ((DevicePath->Type == 0) || (DevicePath->SubType == 0) || (DevicePathNodeLength (DevicePath) < sizeof (EFI_DEVICE_PATH_PROTOCOL))) {\r
       //\r
       // Invalid device path\r
       //\r