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

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