mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/qdrw: check bytes per scanline for 2bpp images
One byte less is read in case of small width. Closes #6194. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
86ab6b6e08
commit
26a7d6a301
@ -81,7 +81,10 @@ static int decode_rle_bpp2(AVCodecContext *avctx, AVFrame *p, GetByteContext *gb
|
||||
int pos = 0;
|
||||
|
||||
/* size of packed line */
|
||||
size = left = bytestream2_get_be16(gbc);
|
||||
if (offset / 4 > 200)
|
||||
size = left = bytestream2_get_be16(gbc);
|
||||
else
|
||||
size = left = bytestream2_get_byte(gbc);
|
||||
if (bytestream2_get_bytes_left(gbc) < size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user