mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/mpeg4videodec: Check mb_num also against 0
The spec implies that 0 is invalid in addition to the existing checks Found-by: <kierank> Reviewed-by: Kieran Kunhya <kieran618@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 05f4703a168a336363750e32bcfdd6f303fbdbc3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ed06873b7b
commit
54a7d3efc4
@ -458,7 +458,7 @@ int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx)
|
||||
}
|
||||
|
||||
mb_num = get_bits(&s->gb, mb_num_bits);
|
||||
if (mb_num >= s->mb_num) {
|
||||
if (mb_num >= s->mb_num || !mb_num) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"illegal mb_num in video packet (%d %d) \n", mb_num, s->mb_num);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user