mirror of https://github.com/acidanthera/audk.git
Fix potential buffer overflow issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8627 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f0a3b1a221
commit
84fa6c177e
|
@ -755,6 +755,7 @@ GetConsoleMenu (
|
|||
NewMenuEntry->OptionNumber = Index2;
|
||||
|
||||
NewConsoleContext->DevicePath = DuplicateDevicePath (DevicePathInst);
|
||||
ASSERT (NewConsoleContext->DevicePath != NULL);
|
||||
NewMenuEntry->DisplayString = EfiLibStrFromDatahub (NewConsoleContext->DevicePath);
|
||||
if (NULL == NewMenuEntry->DisplayString) {
|
||||
NewMenuEntry->DisplayString = DevicePathToStr (NewConsoleContext->DevicePath);
|
||||
|
|
|
@ -469,7 +469,7 @@ HotkeyRegisterNotify (
|
|||
return Status;
|
||||
}
|
||||
Index ++;
|
||||
} while (Index < Hotkey->CodeCount);
|
||||
} while ((Index < Hotkey->CodeCount) && (Index < (sizeof (Hotkey->KeyData) / sizeof (EFI_KEY_DATA))));
|
||||
|
||||
Link = GetNextNode (&mHotkeyList, Link);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue