From ea71e58b0c3eca3744824fbd7e282ce47abfe334 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 27 Nov 2010 14:54:26 +0800 Subject: [PATCH] Fixed false positive on VESA cursor OOB checks --- Modules/Display/VESA/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Display/VESA/main.c b/Modules/Display/VESA/main.c index bafab9d1..425533bd 100644 --- a/Modules/Display/VESA/main.c +++ b/Modules/Display/VESA/main.c @@ -516,9 +516,9 @@ void Vesa_FlipCursor(void *Arg) //Debug("Cursor flip"); - // Sanity 1 + // Sanity check if(giVesaCursorX < 0 || giVesaCursorY < 0 - || y*pitch + x + giVT_CharHeight*pitch > (int)gpVesaCurMode->fbSize/4) { + || y*pitch + x + (giVT_CharHeight-1)*pitch > (int)gpVesaCurMode->fbSize/4) { Log_Notice("VESA", "Cursor OOB (%i,%i)", x, y); giVesaCursorTimer = -1; return; -- 2.20.1