[Kernel] Check for null hmodule_ptr in XexLoadImage

This commit is contained in:
Adrian 2024-08-28 13:11:50 +01:00 committed by Radosław Gliński
parent a867320a87
commit c430a1748a
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,10 @@ dword_result_t xeXexLoadImage(
bool isFromMemory) {
X_STATUS result = X_STATUS_NO_SUCH_FILE;
if (!hmodule_ptr) {
return X_ERROR_INVALID_PARAMETER;
}
uint32_t hmodule = 0;
auto module = kernel_state()->GetModule(module_name.value());
if (module) {