From: John Hodge Date: Sat, 27 Nov 2010 06:54:26 +0000 (+0800) Subject: Fixed false positive on VESA cursor OOB checks X-Git-Tag: rel0.07~47 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=ea71e58b0c3eca3744824fbd7e282ce47abfe334;p=tpg%2Facess2.git Fixed false positive on VESA cursor OOB checks --- 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;