Make PH_IMAGE_RESOURCE_ENTRY.Data return a VA instead of a RVA
PIMAGE_RESOURCE_DATA_ENTRY return a RVA per the PE-COFF specification,
so we need to convert it into a VA before using it.
@@ -1688,7 +1688,7 @@ NTSTATUS PhGetMappedImageResources(
Resources->ResourceEntries[resourceIndex].Type = NAME_FROM_RESOURCE_ENTRY(resourceDirectory, resourceType);
Resources->ResourceEntries[resourceIndex].Name = NAME_FROM_RESOURCE_ENTRY(resourceDirectory, resourceName);
Resources->ResourceEntries[resourceIndex].Language = NAME_FROM_RESOURCE_ENTRY(resourceDirectory, resourceLanguage);
- Resources->ResourceEntries[resourceIndex].Data = PTR_ADD_OFFSET(MappedImage->ViewBase, resourceData->OffsetToData);
+ Resources->ResourceEntries[resourceIndex].Data = PhMappedImageRvaToVa(MappedImage, resourceData->OffsetToData, NULL);
Resources->ResourceEntries[resourceIndex++].Size = resourceData->Size;
}
}
