From 27f1a2fb715559590a4bdff030c8fef6381575b8 Mon Sep 17 00:00:00 2001 From: Rida Dzhaafar Date: Thu, 17 Sep 2020 20:02:01 -0400 Subject: [PATCH] fixed a bug in LowFragmentationHeap --- al-khaser/AntiDebug/LowFragmentationHeap.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/al-khaser/AntiDebug/LowFragmentationHeap.cpp b/al-khaser/AntiDebug/LowFragmentationHeap.cpp index 903ecab5..9ae69ee9 100644 --- a/al-khaser/AntiDebug/LowFragmentationHeap.cpp +++ b/al-khaser/AntiDebug/LowFragmentationHeap.cpp @@ -51,6 +51,11 @@ Return Value: #endif } + // When running in a Win10 VM FrontEndHeap does not get initialized, + // so we get a null pointer dereferencing error. + if (FrontEndHeap == NULL) { + return TRUE; + } // In Windows 10. the offset changes very often. // Ignoring it from now. if (*FrontEndHeap == NULL) { @@ -58,4 +63,4 @@ Return Value: } return FALSE; -} \ No newline at end of file +}