avcodec/cbs_mpeg2: Treat slices without data as invalid
They are spec-incompliant. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b1aecad9ea
commit
ce920f4793
@ -245,6 +245,9 @@ static int cbs_mpeg2_read_unit(CodedBitstreamContext *ctx,
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
if (!get_bits_left(&gbc))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
pos = get_bits_count(&gbc);
|
pos = get_bits_count(&gbc);
|
||||||
len = unit->data_size;
|
len = unit->data_size;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user