diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-22 14:19:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-22 14:58:28 +0200 |
commit | 9a4f5b76169a71156819dbaa8ee0b6ea25dc7195 (patch) | |
tree | 5487924372ca81a942e72689b1d50ad825568e3c /libavcodec/mjpegbdec.c | |
parent | abec6549ae1e86fdf89dbab8a8abca8eb7205c6e (diff) | |
download | ffmpeg-9a4f5b76169a71156819dbaa8ee0b6ea25dc7195.tar.gz |
mjpegbdec: check SOS/SOF ordering.
Fixes null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegbdec.c')
-rw-r--r-- | libavcodec/mjpegbdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c index 2c1d67f7a1..c457b98081 100644 --- a/libavcodec/mjpegbdec.c +++ b/libavcodec/mjpegbdec.c @@ -52,6 +52,7 @@ static int mjpegb_decode_frame(AVCodecContext *avctx, buf_ptr = buf; buf_end = buf + buf_size; + s->got_picture = 0; read_header: /* reset on every SOI */ |