mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-21 14:26:59 +00:00
avcodec/dvdsubdec: error on bitmaps with size 0
Attemtping to decode them could lead to invalid writes with some fuzzed
samples.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bcaa9099b3
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bda7aa7cb3
commit
59fc55b297
@ -101,6 +101,9 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h,
|
||||
if (start >= buf_size)
|
||||
return -1;
|
||||
|
||||
if (w <= 0 || h <= 0)
|
||||
return -1;
|
||||
|
||||
bit_len = (buf_size - start) * 8;
|
||||
init_get_bits(&gb, buf + start, bit_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user