Commit a487635b authored by Limin Wang's avatar Limin Wang

avcodec/dynamic_hdr10_plus: check size before using it

Reviewed-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: 's avatarLimin Wang <lance.lmwang@gmail.com>
parent 4c079636
......@@ -40,10 +40,10 @@ int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(AVDynamicHDRPlus *s, const uint8_t
if (ret < 0)
return ret;
s->application_version = get_bits(gb, 8);
if (get_bits_left(gb) < 2)
if (get_bits_left(gb) < 10)
return AVERROR_INVALIDDATA;
s->application_version = get_bits(gb, 8);
s->num_windows = get_bits(gb, 2);
if (s->num_windows < 1 || s->num_windows > 3) {
......
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