Add check after allocate pool.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7347 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2009-01-22 14:09:21 +00:00
parent 60c65d37e2
commit 80882266ed
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}