diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-04 04:31:46 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-04 04:31:46 +0000 |
commit | 0dc99784366897508ea0309df6e2a75f85662fcc (patch) | |
tree | 8b8220dc6325829c733c69c28d0d8aa264439e0d /MdeModulePkg/Bus | |
parent | ea43036162630d567798bf763c80f1a1acc1d132 (diff) | |
download | edk2-platforms-0dc99784366897508ea0309df6e2a75f85662fcc.tar.xz |
add check for invalid handle.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7795 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index c78305e780..e2c86b07b4 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -1102,6 +1102,10 @@ USBKeyboardUnregisterKeyNotify ( if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER;
}
+
+ if (((KEYBOARD_CONSOLE_IN_EX_NOTIFY *) NotificationHandle)->Signature != USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE) {
+ return EFI_INVALID_PARAMETER;
+ }
UsbKeyboardDevice = TEXT_INPUT_EX_USB_KB_DEV_FROM_THIS (This);
|