diff options
Diffstat (limited to 'libavcodec/flvdec.c')
-rw-r--r-- | libavcodec/flvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c index 3e55aaf8c1..af60dad9d5 100644 --- a/libavcodec/flvdec.c +++ b/libavcodec/flvdec.c @@ -104,6 +104,8 @@ int ff_flv_decode_picture_header(MpegEncContext *s) /* PEI */ while (get_bits1(&s->gb) != 0) { skip_bits(&s->gb, 8); + if (get_bits_left(&s->gb) <= 0) + return AVERROR_INVALIDDATA; } s->f_code = 1; |