mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 04:12:14 +00:00
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)
|
||||
return err;
|
||||
|
||||
if (!get_bits_left(&gbc))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
pos = get_bits_count(&gbc);
|
||||
len = unit->data_size;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user