git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8381
6f19259b-4bc3-4df7-8a09-
765794883524
//\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