ntdll: Handle partial image load config structs.
This commit is contained in:
parent
a7c7bc9180
commit
2a904d3bb3
|
@ -1320,7 +1320,8 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
|
|||
|
||||
loadcfg = RtlImageDirectoryEntryToData( (HMODULE)ptr, TRUE,
|
||||
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG, &loadcfg_size );
|
||||
if (loadcfg && loadcfg_size >= sizeof(*loadcfg))
|
||||
if (loadcfg &&
|
||||
loadcfg_size >= offsetof(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie) + sizeof(loadcfg->SecurityCookie))
|
||||
set_security_cookie((ULONG_PTR *)loadcfg->SecurityCookie);
|
||||
|
||||
/* set the image protections */
|
||||
|
|
Loading…
Reference in New Issue