diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-30 14:23:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-30 14:39:31 +0100 |
commit | b0f8b5c8190ae1f8abf56695c8211d6e82022323 (patch) | |
tree | 5a1a41df20dee8796febbfd3d6da356333ec5936 /libavcodec/flvdec.c | |
parent | 9f5b75f2416cf8c9a1753159b65591c249006c33 (diff) | |
download | ffmpeg-b0f8b5c8190ae1f8abf56695c8211d6e82022323.tar.gz |
avcodec/flvdec: make while get_bits loop more robust by checking bits left
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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; |