diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-02 03:16:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-02 03:21:55 +0200 |
commit | 701dd6eab0e9ad910073c9823319091ea20723dc (patch) | |
tree | a444947bc0ca535564996398e7a1af9df9f4233c /libavcodec/mjpegdec.c | |
parent | ace432f62cdcedf812e7c4d77fc5b03322170fa8 (diff) | |
parent | f5d14a92cb6aebd0bac3599847d6302842115e3f (diff) | |
download | ffmpeg-701dd6eab0e9ad910073c9823319091ea20723dc.tar.gz |
Merge remote branch 'qatar/release/0.6' into release/0.6
* qatar/release/0.6:
Release notes for 0.6.3
update Changelog
Duplicate AMV: disable DR1 and don't override EMU_EDGE
lavf: inspect more frames for fps when container time base is coarse
Duplicate Fix races in default av_log handler
aac: add headers needed for log2f()
mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Conflicts:
Changelog
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7f57af905c..9f2f88b5de 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -792,6 +792,10 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, i if (s->restart_interval && !s->restart_count) s->restart_count = s->restart_interval; + if(get_bits_count(&s->gb)>s->gb.size_in_bits){ + av_log(s->avctx, AV_LOG_ERROR, "overread %d\n", get_bits_count(&s->gb) - s->gb.size_in_bits); + return -1; + } for(i=0;i<nb_components;i++) { uint8_t *ptr; int n, h, v, x, y, c, j; |