add check for invalid handle.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7795 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-03-04 04:31:46 +00:00
parent ea43036162
commit 0dc9978436
5 changed files with 22 additions and 2 deletions

View File

@ -684,7 +684,11 @@ KeyboardUnregisterKeyNotify (
if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER;
}
if (((KEYBOARD_CONSOLE_IN_EX_NOTIFY *) NotificationHandle)->Signature != KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE) {
return EFI_INVALID_PARAMETER;
}
ConsoleInDev = TEXT_INPUT_EX_KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (This);
//