tuxtxt.cpp: fixheap buffer overflow

Origin commit data
------------------
Commit: 160dda776c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-06-22 (Mon, 22 Jun 2015)
This commit is contained in:
Jacek Jendrzej
2015-06-22 19:24:53 +02:00
parent d00a6dbf84
commit 3d0daaa3ad

View File

@@ -4765,6 +4765,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
for (Pitch = 0; Pitch < sbit->pitch; Pitch++)
{
if (sbit_diacrit->pitch > Pitch && sbit_diacrit->height > Row)
if((sbit_diacrit->pitch*sbit_diacrit->height) > (Row*sbit->pitch+Pitch))
sbitbuffer[Row*sbit->pitch+Pitch] |= sbit_diacrit->buffer[Row*sbit->pitch+Pitch];
}
}