Commit 0de04aff authored by Forteve Zepushisti's avatar Forteve Zepushisti Committed by Jean-Baptiste Kempf

fix gui/skins2: ft2_bitmap.cpp write after allocated block

this fixes trac #10134
Signed-off-by: default avatarErwan Tulou <erwan10@videolan.org>
parent df28caa3
......@@ -50,10 +50,10 @@ void FT2Bitmap::draw( const FT_Bitmap &rBitmap, int left, int top,
uint8_t green = (color >> 8) & 0xff;
uint8_t red = (color >> 16) & 0xff;
for( int y = top; y < top + rBitmap.rows; y++ )
for( int y = top; y < top + rBitmap.rows && y < m_height; y++ )
{
uint8_t *pData = m_pData + 4 * (m_width * y + left);
for( int x = left; x < left + rBitmap.width; x++ )
for( int x = left; x < left + rBitmap.width && x < m_width; x++ )
{
// The buffer in FT_Bitmap contains alpha values
uint8_t val = *(pBuf++);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment