Permalink
Browse files

Fix potential buffer overflow using karaoke.

  • Loading branch information...
1 parent 2045147 commit c34f35bb984f914fdd43a7434dae78e65045cddb Mike committed Jul 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/music/karaoke/karaokelyricscdg.cpp
@@ -89,7 +89,7 @@ void CKaraokeLyricsCDG::setPixel( int x, int y, BYTE color )
{
unsigned int offset = x + y * CDG_FULL_WIDTH;
- if ( x < 0 || y < 0 || offset > CDG_FULL_HEIGHT * CDG_FULL_WIDTH )
+ if ( x < 0 || y < 0 || offset >= CDG_FULL_HEIGHT * CDG_FULL_WIDTH )
{
CLog::Log( LOGERROR, "CDG renderer: set pixel (%d,%d) is out of boundary", x, y );
return;

0 comments on commit c34f35b

Please sign in to comment.