Use SrcPitch when calculating size of memory to map PresentDisplayOnly
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@redhat.com>
This commit is contained in:
parent
8ec2bf9c68
commit
e828c45bf2
@ -3641,7 +3641,7 @@ QxlDevice::ExecutePresentDisplayOnly(
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Map Source into kernel space, as Blt will be executed by system worker thread
|
// 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);
|
PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap, FALSE, FALSE, NULL);
|
||||||
if(!mdl)
|
if(!mdl)
|
||||||
|
Loading…
Reference in New Issue
Block a user