@@ -938,7 +938,10 @@ static int display_rle8_bitmap (bmp_image_t *img, int xoff, int yoff,
/* scan line end marker */
bm += 2;
x = 0;
- y--;
+ if (--y < 0) {
+ decode = 0;
+ continue;
+ }
fbp = (unsigned char *)
((unsigned int)video_fb_address +
(((y + yoff) * VIDEO_COLS) +
@@ -952,6 +955,10 @@ static int display_rle8_bitmap (bmp_image_t *img, int xoff, int yoff,
/* run offset marker */
x += bm[2];
y -= bm[3];
+ if (y < 0) {
+ decode = 0;
+ continue;
+ }
fbp = (unsigned char *)
((unsigned int)video_fb_address +
(((y + yoff) * VIDEO_COLS) +