[Spice-devel] [PATCH v3 10/28] Use SrcPitch when calculating size of memory to map PresentDisplayOnly
Sameeh Jubran
sameeh at daynix.com
Wed Sep 7 13:10:28 UTC 2016
From: Sandy Stutsman <sstutsma at redhat.com>
Can result in a BSOD, as the image would be mapped only partially causing page faults when
accessing missing piece of the image.
Acked-by: Frediano Ziglio <fziglio at redhat.com>
---
qxldod/QxlDod.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index fdaae8e..014e236 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3638,7 +3638,7 @@ QxlDevice::ExecutePresentDisplayOnly(
{
// Map Source into kernel space, as Blt will be executed by system worker thread
- UINT sizeToMap = SrcBytesPerPixel * ctx->SrcWidth * ctx->SrcHeight;
+ UINT sizeToMap = ctx->SrcPitch * ctx->SrcHeight;
PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap, FALSE, FALSE, NULL);
if(!mdl)
--
2.7.0.windows.1
More information about the Spice-devel
mailing list