summaryrefslogtreecommitdiff
path: root/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp
diff options
context:
space:
mode:
authorkarlf <[email protected]>2016-08-11 13:28:13 -0700
committerkarlf <[email protected]>2016-08-11 13:28:13 -0700
commit96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch)
treead5f3ede5cbcd6b598677ce41bcf8318471bdd92 /network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp
parent687b274aa38fd05c8c26e3068932121876d7f745 (diff)
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp')
-rw-r--r--network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp
index f2782ce7..e70d9999 100644
--- a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp
+++ b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp
@@ -113,20 +113,20 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer,
SIZE_T mdlByteCount = 0;
SIZE_T remainingBytesToCopy = bytesToCopy;
SIZE_T copySize = 0;
+ UINT32 noExecute = 0;
*pBytesCopied = 0;
- if(MmGetMdlByteCount(pMDL) >= mdlOffset + bytesToCopy)
- {
- BYTE* pSystemAddress = 0;
- UINT32 noExecute = 0;
-
#if(NTDDI_VERSION >= NTDDI_WIN8)
- noExecute = MdlMappingNoExecute;
+ noExecute = MdlMappingNoExecute;
#endif /// (NTDDI_VERSION >= NTDDI_WIN8)
+ if(MmGetMdlByteCount(pMDL) >= mdlOffset + bytesToCopy)
+ {
+ BYTE* pSystemAddress = 0;
+
pSystemAddress = (BYTE*)MmGetSystemAddressForMdlSafe(pMDL,
LowPagePriority | noExecute);
if(pSystemAddress)
@@ -171,7 +171,7 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer,
mdlByteCount);
pSystemAddress = (BYTE*)MmGetSystemAddressForMdlSafe(pMDL,
- LowPagePriority);
+ LowPagePriority | noExecute);
if(pSystemAddress)
{
RtlCopyMemory(pSystemAddress + mdlOffset,