Fix buffer overflow on GsLoadFont
LoadImage accesses img[0..15] when w=16, h=1, causing it to read past `pal`.
This commit is contained in:
parent
d9acf265ff
commit
d3780c0d7d
|
@ -1045,7 +1045,7 @@ void GsSetDispEnvSimple(int x, int y)
|
||||||
|
|
||||||
void GsLoadFont(int fb_x, int fb_y, int cx, int cy)
|
void GsLoadFont(int fb_x, int fb_y, int cx, int cy)
|
||||||
{
|
{
|
||||||
unsigned short pal[2] = {0x0, 0x7fff};
|
const unsigned short pal[16] = {0x0, 0x7fff};
|
||||||
|
|
||||||
LoadImage(psxsdk_font_data, fb_x, fb_y, 16, 128);
|
LoadImage(psxsdk_font_data, fb_x, fb_y, 16, 128);
|
||||||
while(GsIsDrawing());
|
while(GsIsDrawing());
|
||||||
|
|
Loading…
Reference in New Issue