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:
parent
d5b63319f0
commit
19ef6988b6
@ -430,7 +430,7 @@ int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash
|
||||
|
||||
char 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;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user