From 8ec2bf9c681da33931036f79ab426d7e0cce4b94 Mon Sep 17 00:00:00 2001 From: Sandy Stutsman Date: Wed, 21 Oct 2015 11:54:37 -0400 Subject: [PATCH] Fix Code Integrity error generated by the Drive Verifier Add MdlMappingNoExecute to MmGetSystemAddressForMDLSafe call in ExecutePresentDisplayOnly. Acked-by: Frediano Ziglio --- qxldod/QxlDod.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 2793a1d..37650db 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -2770,7 +2770,7 @@ VgaDevice::ExecutePresentDisplayOnly( // Note: double mapping the buffer this way causes lot of system // overhead for large size buffers. ctx->SrcAddr = reinterpret_cast - (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority )); + (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | MdlMappingNoExecute)); if(!ctx->SrcAddr) { Status = STATUS_INSUFFICIENT_RESOURCES; @@ -3669,7 +3669,7 @@ QxlDevice::ExecutePresentDisplayOnly( // Note: double mapping the buffer this way causes lot of system // overhead for large size buffers. ctx->SrcAddr = reinterpret_cast - (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority )); + (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | MdlMappingNoExecute)); if(!ctx->SrcAddr) { Status = STATUS_INSUFFICIENT_RESOURCES;