From ef6c9d2af50ac03b28ad92ea90105047d8bc9948 Mon Sep 17 00:00:00 2001 From: Alexandre Rostovtsev Date: Sun, 12 Sep 2010 23:53:26 -0400 Subject: [PATCH] Fix VbeModeInfoBlock memcpy. Reserved2 is 189 bytes (not 188). From LinBytesPerScanLine to end of Reserved2 we have 189 + 16 = 205 bytes (not 206). From PhysBasePtr to end of Reserved2 we have 189 + 26 = 215 bytes (not 216). --- hw/xfree86/vbe/vbe.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index 0b34648..2051577 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -583,13 +583,13 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode) block->LinRsvdMaskSize = ((char*)pVbe->memory)[60]; block->LinRsvdFieldPosition = ((char*)pVbe->memory)[61]; block->MaxPixelClock = *(CARD32*)(((char*)pVbe->memory) + 62); - memcpy(&block->Reserved2, ((char*)pVbe->memory) + 66, 188); + memcpy(&block->Reserved2, ((char*)pVbe->memory) + 66, 189); } else - memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 206); + memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 205); } else - memcpy(&block->PhysBasePtr, ((char*)pVbe->memory) + 40, 216); + memcpy(&block->PhysBasePtr, ((char*)pVbe->memory) + 40, 215); return block; } -- 1.7.2.2