summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-02 17:55:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-02 17:55:07 +0300
commitbed12f184d285fe27141d89d14f93d723777bf05 (patch)
treea59f3fc3acdfcc8f7e265bc05b00e0b3612a3701 /tools
parent7e737d6796a99bab1d1f1bb59dedd64f1bb95887 (diff)
version of checksum that handles multiple debug info entries ported to PluginUpdater
Diffstat (limited to 'tools')
-rw-r--r--tools/checksum/checksum.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/checksum/checksum.cpp b/tools/checksum/checksum.cpp
index 1469197554..180c2b00c9 100644
--- a/tools/checksum/checksum.cpp
+++ b/tools/checksum/checksum.cpp
@@ -172,7 +172,6 @@ int PEChecksum(wchar_t *filename, BYTE digest[16])
if ((expSize >= sizeof(IMAGE_EXPORT_DIRECTORY)) && (expAddr >= pISH->VirtualAddress) && (expAddr + expSize <= pISH->VirtualAddress + pISH->SizeOfRawData)) {
DWORD shift = expAddr - pISH->VirtualAddress;
PIMAGE_EXPORT_DIRECTORY pEXP = (PIMAGE_EXPORT_DIRECTORY)(ptr + shift + pISH->PointerToRawData);
-
pEXP->TimeDateStamp = 0;
if (debug)
@@ -209,14 +208,13 @@ int PEChecksum(wchar_t *filename, BYTE digest[16])
// patch resources
if (resSize > 0 && resAddr >= pISH->VirtualAddress && resAddr + resSize <= pISH->VirtualAddress + pISH->SizeOfRawData) {
DWORD shift = resAddr - pISH->VirtualAddress + pISH->PointerToRawData;
- IMAGE_RESOURCE_DIRECTORY* pIRD = (IMAGE_RESOURCE_DIRECTORY*)(ptr + shift);
+ IMAGE_RESOURCE_DIRECTORY *pIRD = (IMAGE_RESOURCE_DIRECTORY*)(ptr + shift);
PatchResourcesDirectory(pIRD, ptr + shift);
}
// rebase to zero address
if (pRealloc) {
DWORD blocklen = relocSize;
-
PIMAGE_BASE_RELOCATION pIBR = (PIMAGE_BASE_RELOCATION)pRealloc;
while (pIBR) {
if ((pIBR->VirtualAddress >= pISH->VirtualAddress) &&