Commit bcaa9099 authored by wm4's avatar wm4 Committed by Michael Niedermayer

avcodec/dvdsubdec: error on bitmaps with size 0

Attemtping to decode them could lead to invalid writes with some fuzzed
samples.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3ed80bd9
......@@ -111,6 +111,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment