SysCall: Added sanity checks.

This commit is contained in:
Mikhail Krichanov 2024-05-29 09:40:29 +03:00
parent 3e4f215f1a
commit 6201352b42
1 changed files with 7 additions and 4 deletions

View File

@ -251,6 +251,7 @@ PrepareRing3Interface (
Unicode->SupportedLanguages
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Could not copy string!\n"));
return NULL;
}
@ -346,9 +347,10 @@ CallBootService (
DisableSMAP ();
if (Interface != NULL) {
Interface = PrepareRing3Interface (CoreProtocol, Interface, MemoryCoreSize);
}
ASSERT (Interface != NULL);
*(VOID **)CoreRbp->Argument3 = Interface;
*(VOID **)CoreRbp->Argument3 = Interface;
}
EnableSMAP ();
return Status;
@ -558,9 +560,10 @@ CallBootService (
DisableSMAP ();
if (Interface != NULL) {
Interface = PrepareRing3Interface (CoreProtocol, Interface, MemoryCoreSize);
}
ASSERT (Interface != NULL);
*(VOID **)CoreRbp->Argument3 = Interface;
*(VOID **)CoreRbp->Argument3 = Interface;
}
EnableSMAP ();
return Status;