From 8b1c8dc161e6f7fa671b12bcdf8306a109b1cf67 Mon Sep 17 00:00:00 2001 From: anzz1 Date: Tue, 15 Aug 2023 02:48:49 +0300 Subject: [PATCH] bound check --- dllmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dllmain.c b/dllmain.c index 8716d1c..a62a751 100644 --- a/dllmain.c +++ b/dllmain.c @@ -115,7 +115,7 @@ __forceinline static int securom_check(HMODULE hModule) { if (GetModuleFileNameA(hModule, path, 511)) { path[511] = 0; p = __strrchr(path, '\\'); - if (p) { + if (p && p-path < 485) { __strcpy(++p, "disable_securom_guard.txt"); if (FileExistsA(path)) return 0;