diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-22 14:09:21 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-22 14:09:21 +0000 |
commit | 80882266edab7e0f88684c436ed97d773034b480 (patch) | |
tree | 786031536e19015b38ced853702371aa14994550 /MdeModulePkg/Universal/PlatformDriverOverride | |
parent | 60c65d37e2437d6a8bbf4bb1d31751e14650c6fa (diff) | |
download | edk2-80882266edab7e0f88684c436ed97d773034b480.zip edk2-80882266edab7e0f88684c436ed97d773034b480.tar.gz edk2-80882266edab7e0f88684c436ed97d773034b480.tar.bz2 |
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/Universal/PlatformDriverOverride')
-rw-r--r-- | MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c b/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c index a60e557..a7e5df4 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);
}
|