From dd0b049048a88fe5a2bfbb7d2ff2e4c5ae1e4ada Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 14 Nov 2026 22:59:52 -0600 Subject: [PATCH] Fix incorrect length passed to MultiByteToWideChar() --- AntiHooking/antihookingprotection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AntiHooking/antihookingprotection.cpp b/AntiHooking/antihookingprotection.cpp index 9b54916e..dde8daba 100644 --- a/AntiHooking/antihookingprotection.cpp +++ b/AntiHooking/antihookingprotection.cpp @@ -82,7 +82,7 @@ private: PWCHAR wideBuffer = new WCHAR[uniChars]; uniChars = MultiByteToWideChar(CP_THREAD_ACP, 0, lpLibFileName, -1, - wideBuffer, uniChars * sizeof(WCHAR)); + wideBuffer, uniChars); if (uniChars > 0) { bool ret = isImageBlacklistedW(wideBuffer); delete[] wideBuffer;