summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-22 14:09:21 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-22 14:09:21 +0000
commit80882266edab7e0f88684c436ed97d773034b480 (patch)
tree786031536e19015b38ced853702371aa14994550 /MdeModulePkg
parent60c65d37e2437d6a8bbf4bb1d31751e14650c6fa (diff)
downloadedk2-platforms-80882266edab7e0f88684c436ed97d773034b480.tar.xz
Add check after allocate pool.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7347 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c b/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c
index a60e5576de..a7e5df4f53 100644
--- a/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c
+++ b/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c
@@ -789,6 +789,7 @@ UpdateBindingDriverSelectPage (
DriverName = DevicePathToStr (LoadedImageDevicePath);
NewString = AllocateZeroPool (StrSize (DriverName));
+ ASSERT (NewString != NULL);
StrCat (NewString, DriverName);
NewStringHelpToken = mDriverImageFilePathToken[Index];
if (NewStringHelpToken == 0) {
@@ -1227,7 +1228,7 @@ PlatOverMngrCallback (
ASSERT_EFI_ERROR (Status);
}
- if (((KEY_VALUE_DEVICE_OFFSET <= KeyValue) && (KeyValue < KEY_VALUE_DEVICE_MAX)) || (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS)) {
+ if (((KeyValue >= KEY_VALUE_DEVICE_OFFSET) && (KeyValue < KEY_VALUE_DEVICE_MAX)) || (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS)) {
if (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS) {
KeyValue = (EFI_QUESTION_ID) (mSelectedCtrIndex + KEY_VALUE_DEVICE_OFFSET);
}