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:
Sandy Stutsman 2015-11-02 14:35:50 -05:00 committed by Frediano Ziglio
parent 8ec2bf9c68
commit e828c45bf2

View File

@ -3641,7 +3641,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)