From 79b2782dab82a6ba2b7c6f4eea201b90183bd959 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Mon, 3 Sep 2018 18:42:47 -0400 Subject: [PATCH] bugfix getmemoryrange --- vnrhook/util/ithsys/ithsys.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnrhook/util/ithsys/ithsys.cc b/vnrhook/util/ithsys/ithsys.cc index 126ba49..8c3daf4 100644 --- a/vnrhook/util/ithsys/ithsys.cc +++ b/vnrhook/util/ithsys/ithsys.cc @@ -60,13 +60,13 @@ DWORD SearchPattern(DWORD base, DWORD base_length, LPCVOID search, DWORD search_ DWORD IthGetMemoryRange(LPCVOID mem, DWORD *base, DWORD *size) { - MEMORY_BASIC_INFORMATION info; + MEMORY_BASIC_INFORMATION info = {}; VirtualQuery(mem, &info, sizeof(info)); if (base) *base = (DWORD)info.BaseAddress; if (size) *size = info.RegionSize; - return info.Protect; + return info.Protect > PAGE_NOACCESS; } inline DWORD GetHash(LPSTR str)