Skip to content
Snippets Groups Projects
Commit a19b66df authored by deuce's avatar deuce
Browse files

Add bounds checking in bitmap_draw_one_char()

parent d158b3cf
No related branches found
No related tags found
No related merge requests found
......@@ -860,6 +860,11 @@ static int bitmap_draw_one_char(struct video_stats *vs, unsigned int xpos, unsig
pthread_mutex_lock(&screenlock);
if ((xoffset + vs->charwidth > screenwidth) || yoffset + vs->charheight > screenheight) {
pthread_mutex_unlock(&screenlock);
return(-1);
}
if(!screen) {
pthread_mutex_unlock(&screenlock);
return(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment