In case the BMP size is bigger than the frame buffer, don't use
the BMP's width and height in video_display_rle8_bitmap, but the
one's checked in video_bmp_display() as parameters to
video_display_rle8_bitmap().
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
CC: Yannick Fertré <yannick.fertre@st.com>
static void video_display_rle8_bitmap(struct udevice *dev,
struct bmp_image *bmp, ushort *cmap,
static void video_display_rle8_bitmap(struct udevice *dev,
struct bmp_image *bmp, ushort *cmap,
- uchar *fb, int x_off, int y_off)
+ uchar *fb, int x_off, int y_off,
+ ulong width, ulong height)
{
struct video_priv *priv = dev_get_uclass_priv(dev);
uchar *bmap;
{
struct video_priv *priv = dev_get_uclass_priv(dev);
uchar *bmap;
ulong cnt, runlen;
int x, y;
int decode = 1;
debug("%s\n", __func__);
ulong cnt, runlen;
int x, y;
int decode = 1;
debug("%s\n", __func__);
- width = get_unaligned_le32(&bmp->header.width);
- height = get_unaligned_le32(&bmp->header.height);
bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset);
x = 0;
bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset);
x = 0;
return -EPROTONOSUPPORT;
}
video_display_rle8_bitmap(dev, bmp, cmap_base, fb, x,
return -EPROTONOSUPPORT;
}
video_display_rle8_bitmap(dev, bmp, cmap_base, fb, x,