ntdll: Avoid crashing on an empty resource directory.

This commit is contained in:
Alexandre Julliard 2009-09-24 13:14:47 +02:00
parent b9251bcdbf
commit 5b0fcb065e
1 changed files with 1 additions and 0 deletions

View File

@ -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;