Commit c5c06e39 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/cavsdec: Check frame_rate_code

Fixes CID1239111 part1
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 139e1c80
......@@ -1146,6 +1146,12 @@ static int decode_seq_header(AVSContext *h)
skip_bits(&h->gb, 3); //sample_precision
h->aspect_ratio = get_bits(&h->gb, 4);
frame_rate_code = get_bits(&h->gb, 4);
if (frame_rate_code == 0 || frame_rate_code > 13) {
av_log(h->avctx, AV_LOG_WARNING,
"frame_rate_code %d is invalid\n", frame_rate_code);
frame_rate_code = 1;
}
skip_bits(&h->gb, 18); //bit_rate_lower
skip_bits1(&h->gb); //marker_bit
skip_bits(&h->gb, 12); //bit_rate_upper
......
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