Fixed false positive on VESA cursor OOB checks
authorJohn Hodge <[email protected]>
Sat, 27 Nov 2010 06:54:26 +0000 (14:54 +0800)
committerJohn Hodge <[email protected]>
Sat, 27 Nov 2010 06:54:26 +0000 (14:54 +0800)
Modules/Display/VESA/main.c

index bafab9d..425533b 100644 (file)
@@ -516,9 +516,9 @@ void Vesa_FlipCursor(void *Arg)
        \r
        //Debug("Cursor flip");\r
        \r
-       // Sanity 1\r
+       // Sanity check\r
        if(giVesaCursorX < 0 || giVesaCursorY < 0\r
-       || y*pitch + x + giVT_CharHeight*pitch > (int)gpVesaCurMode->fbSize/4) {\r
+       || y*pitch + x + (giVT_CharHeight-1)*pitch > (int)gpVesaCurMode->fbSize/4) {\r
                Log_Notice("VESA", "Cursor OOB (%i,%i)", x, y);\r
                giVesaCursorTimer = -1;\r
                return;\r

UCC git Repository :: git.ucc.asn.au