[Kernel] Check null pointer in RtlImageXexHeaderField

This commit is contained in:
Adrian 2024-11-25 16:00:46 +00:00 committed by Radosław Gliński
parent 2300b8455c
commit d0b15ff8c9
1 changed files with 4 additions and 0 deletions

View File

@ -503,6 +503,10 @@ pointer_result_t RtlImageXexHeaderField_entry(pointer_t<xex2_header> xex_header,
uint32_t field_value = 0; uint32_t field_value = 0;
uint32_t field = field_dword; // VS acts weird going from dword_t -> enum uint32_t field = field_dword; // VS acts weird going from dword_t -> enum
if (!xex_header) {
return field_value;
}
UserModule::GetOptHeader(kernel_memory(), xex_header, xex2_header_keys(field), UserModule::GetOptHeader(kernel_memory(), xex_header, xex2_header_keys(field),
&field_value); &field_value);