mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
EmulatorPkg: Add Signature to Graphics Structure
When updating MdePkg's CR macro to enforce signature checking in all usages, it was discovered that EmulatorPkg was initializing a structure without setting the signature for it, causing an error to be returned when CR now checked the signature. This commit updates the graphics stack in EmulatorPkg to set the signature of the data structure and check the return value of the wrapper for the CR macro. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
parent
596773f5e3
commit
77c070b1a7
2 changed files with 5 additions and 0 deletions
|
|
@ -404,6 +404,10 @@ WinNtWndRegisterKeyNotify (
|
|||
|
||||
Private = GRAPHICS_PRIVATE_DATA_FROM_THIS (GraphicsIo);
|
||||
|
||||
if (Private == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Private->MakeRegisterdKeyCallback = MakeCallBack;
|
||||
Private->BreakRegisterdKeyCallback = BreakCallBack;
|
||||
Private->RegisterdKeyCallbackContext = Context;
|
||||
|
|
|
|||
|
|
@ -808,6 +808,7 @@ WinNtGraphicsWindowOpen (
|
|||
|
||||
GopPrivateCreateQ (Private, &Private->QueueForRead);
|
||||
|
||||
Private->Signature = GRAPHICS_PRIVATE_DATA_SIGNATURE;
|
||||
Private->GraphicsWindowIo.Size = WinNtWndSize;
|
||||
Private->GraphicsWindowIo.CheckKey = WinNtWndCheckKey;
|
||||
Private->GraphicsWindowIo.GetKey = WinNtWndGetKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue