ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@gmail.com> | Mon Dec 9 23:26:04 2019 +0100| [ce920f47930d2a1df6628f026a926425f534e8d2] | committer: Michael Niedermayer
avcodec/cbs_mpeg2: Treat slices without data as invalid They are spec-incompliant. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce920f47930d2a1df6628f026a926425f534e8d2 --- libavcodec/cbs_mpeg2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c index 13d871cc89..0e5d08ecbf 100644 --- a/libavcodec/cbs_mpeg2.c +++ b/libavcodec/cbs_mpeg2.c @@ -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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".