ntdll: Avoid crashing on an empty resource directory.
This commit is contained in:
parent
b9251bcdbf
commit
5b0fcb065e
|
@ -186,6 +186,7 @@ static NTSTATUS find_entry( HMODULE hmod, const LDR_RESOURCE_INFO *info,
|
|||
|
||||
root = RtlImageDirectoryEntryToData( hmod, TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &size );
|
||||
if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND;
|
||||
if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
|
||||
resdirptr = root;
|
||||
|
||||
if (!level--) goto done;
|
||||
|
|
Loading…
Reference in New Issue