summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/PluginUpdater/src/checksum.cpp9
-rw-r--r--plugins/PluginUpdater/src/stdafx.h1
-rw-r--r--tools/checksum/checksum.cpp9
-rw-r--r--tools/checksum/checksum.exebin17920 -> 18432 bytes
4 files changed, 14 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/checksum.cpp b/plugins/PluginUpdater/src/checksum.cpp
index 2a1fd1b5a9..73d8a30734 100644
--- a/plugins/PluginUpdater/src/checksum.cpp
+++ b/plugins/PluginUpdater/src/checksum.cpp
@@ -19,6 +19,8 @@
int debug = 0;
DWORD dwVersion = 0;
+#pragma comment(lib, "version.lib")
+
struct MFileMapping
{
PBYTE ptr;
@@ -205,8 +207,11 @@ LBL_NotPE:
// patch version
if (dwVersion) {
shift = dwVersion - pISH->VirtualAddress + pISH->PointerToRawData;
- VS_FIXEDFILEINFO *pVersion = (VS_FIXEDFILEINFO*)(map.ptr + shift);
- pVersion->dwProductVersionLS = pVersion->dwProductVersionMS = 0;
+
+ UINT blockSize;
+ VS_FIXEDFILEINFO *vsffi;
+ VerQueryValue(map.ptr + shift, L"\\", (PVOID*)&vsffi, &blockSize);
+ vsffi->dwProductVersionLS = vsffi->dwProductVersionMS = 0;
}
}
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index e90119bcd6..00be8fc56f 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -229,7 +229,6 @@ wchar_t* GetDefaultUrl();
bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
-void __stdcall RestartMe(void*);
void __stdcall OpenPluginOptions(void*);
void CheckUpdateOnStartup();
void InitTimer(void *type);
diff --git a/tools/checksum/checksum.cpp b/tools/checksum/checksum.cpp
index affaea11a4..0e19ab1693 100644
--- a/tools/checksum/checksum.cpp
+++ b/tools/checksum/checksum.cpp
@@ -15,6 +15,8 @@
#define RESULT_INVALID 50
#define RESULT_NONE 100
+#pragma comment(lib, "version.lib")
+
int debug = 0;
DWORD dwVersion = 0;
@@ -224,8 +226,11 @@ int PEChecksum(wchar_t *filename, BYTE digest[16])
// patch version
if (dwVersion) {
shift = dwVersion - pISH->VirtualAddress + pISH->PointerToRawData;
- VS_FIXEDFILEINFO *pVersion = (VS_FIXEDFILEINFO*)(ptr + shift);
- pVersion->dwProductVersionLS = pVersion->dwProductVersionMS = 0;
+
+ UINT blockSize;
+ VS_FIXEDFILEINFO *vsffi;
+ VerQueryValue(ptr + shift, L"\\", (PVOID*)&vsffi, &blockSize);
+ vsffi->dwProductVersionLS = vsffi->dwProductVersionMS = 0;
}
}
diff --git a/tools/checksum/checksum.exe b/tools/checksum/checksum.exe
index a26ab4a0c3..f4e21190c6 100644
--- a/tools/checksum/checksum.exe
+++ b/tools/checksum/checksum.exe
Binary files differ