diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-23 08:57:31 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-23 08:57:31 +0000 |
commit | 84fa6c177ea92ac85453017d2941d3140b808ef7 (patch) | |
tree | ace5a7ee3c77da783ff4ecef26ada3cad608873c /IntelFrameworkModulePkg/Universal/BdsDxe | |
parent | f0a3b1a221ad8a678de18fb8ad9e2a6ba8112093 (diff) | |
download | edk2-platforms-84fa6c177ea92ac85453017d2941d3140b808ef7.tar.xz |
Fix potential buffer overflow issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8627 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c | 1 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c index 06fd0e0af7..c6c9915f55 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c @@ -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);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c index 3ce9c0ebad..72139a8b4d 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c @@ -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);
}
|