1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-02-26 06:48:35 +01:00

Utility: Fied possible stack buffer overrun in ComputeFileHash2

This commit is contained in:
Valentin Radu 2022-02-17 22:50:44 +02:00
parent d5b63319f0
commit 19ef6988b6

View File

@ -430,7 +430,7 @@ int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash
char real_hash[33]; char real_hash[33];
ComputeFileHash(filename, real_hash, 33); ComputeFileHash(filename, real_hash, 33);
strncpy_s(hash + strlen(hash), dwHash, real_hash, 32 - strlen(hash)); strncpy_s(hash + strlen(hash), dwHash - strlen(hash), real_hash, 32 - strlen(hash));
hash[33] = 0; hash[33] = 0;
return ERROR_SUCCESS; return ERROR_SUCCESS;