diff options
author | Won Star | 2005-12-08 12:39:54 +0000 |
---|---|---|
committer | Won Star | 2005-12-08 12:39:54 +0000 |
commit | 3878231019a0381e8cec537dbd55f69743eacce6 (patch) | |
tree | 24200b15b28df31fb5118fca27aa278d7ddeb04d /backends | |
parent | eaf4f2f6f4c8cd6581bd45aa01ff776c6c9570f7 (diff) | |
download | scummvm-rg350-3878231019a0381e8cec537dbd55f69743eacce6.tar.gz scummvm-rg350-3878231019a0381e8cec537dbd55f69743eacce6.tar.bz2 scummvm-rg350-3878231019a0381e8cec537dbd55f69743eacce6.zip |
Fixed possible OOB access.
svn-id: r19760
Diffstat (limited to 'backends')
-rw-r--r-- | backends/gp32/gp32std_grap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/gp32/gp32std_grap.cpp b/backends/gp32/gp32std_grap.cpp index 63eb3862d1..820d68f9ee 100644 --- a/backends/gp32/gp32std_grap.cpp +++ b/backends/gp32/gp32std_grap.cpp @@ -46,7 +46,8 @@ void gp_putBitmap8x16(uint16 *frameBuffer, int x, int y, byte *lpBitmap, uint16 byte data = *pBitmap++; for (int nCol = 0; nCol < 7; nCol ++) { if (data & 0x80) - gpd_drawPixel16(frameBuffer, x + nCol, y + nRow, wColor); + if(x + nCol >= 0 && y + nRow >= 0 && x + nCol < 320 && y + nRow < 240) + gpd_drawPixel16(frameBuffer, x + nCol, y + nRow, wColor); data <<= 1; } |