summaryrefslogtreecommitdiff
blob: 239213928acf2edf64ea03a0085b2dd686ed65b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From ef6c9d2af50ac03b28ad92ea90105047d8bc9948 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gmail.com>
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