]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtGopDxe/WinNtGopInput.c
add check for invalid handle.
[mirror_edk2.git] / Nt32Pkg / WinNtGopDxe / WinNtGopInput.c
index be41a8e854e080e0fe235bdfed2aef73726bc6f4..e9866740ceebe6d80525e65a00ebaefb3a971be4 100644 (file)
@@ -797,7 +797,11 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
   if (NotificationHandle == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   } \r
-  \r
+\r
+  if (((WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {\r
+    return EFI_INVALID_PARAMETER;\r
+  } \r
+\r
   Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);\r
 \r
   for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {\r