diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-26 01:49:53 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-26 01:49:53 +0000 |
commit | 91a306eee79353de56e5c2526a66c4619f283ce1 (patch) | |
tree | 5c1eb3f84b06582e503517d9966d9c98fea4e186 /MdeModulePkg | |
parent | 53fafef5c6fc44a56994df1c3811b220bcda835a (diff) | |
download | edk2-91a306eee79353de56e5c2526a66c4619f283ce1.zip edk2-91a306eee79353de56e5c2526a66c4619f283ce1.tar.gz edk2-91a306eee79353de56e5c2526a66c4619f283ce1.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 90c67d8..d5ef60b 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
//
|