mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 11:30:08 +01: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:
committed by
Michael Niedermayer
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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user