From 6ea16bd7fa1260209266b5dd1e5e59f83e099fa1 Mon Sep 17 00:00:00 2001 From: anders_k Date: Fri, 14 Nov 2014 22:00:46 +0000 Subject: [PATCH] Use SizeOfRawData and not VirtualSize when looking for the export section in a on-disk plugin dll git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6569 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/Plugins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp index 64c250a0..267e2672 100644 --- a/Source/Plugins.cpp +++ b/Source/Plugins.cpp @@ -173,7 +173,7 @@ void Plugins::GetExports(const tstring &pathToDll, bool displayInfo) { DWORD va = FIX_ENDIAN_INT32(sections[i].VirtualAddress); if (va <= ExportDirVA - && va + FIX_ENDIAN_INT32(sections[i].Misc.VirtualSize) >= ExportDirVA + ExportDirSize) + && va + FIX_ENDIAN_INT32(sections[i].SizeOfRawData) >= ExportDirVA + ExportDirSize) { DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData); PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);