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:
klu2
2009-06-23 08:57:31 +00:00
parent f0a3b1a221
commit 84fa6c177e
2 changed files with 2 additions and 1 deletions

View File

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