diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-31 17:57:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-31 18:34:08 +0100 |
commit | 2884688bd51a808ccda3c0e13367619cd79e0579 (patch) | |
tree | 67476bc1055452cc5719b31aa41e949b2206f3fd /libavcodec/mjpegdec.h | |
parent | 13aa82bbbb71c04bdcecf1341be4a23aee271bec (diff) | |
download | ffmpeg-2884688bd51a808ccda3c0e13367619cd79e0579.tar.gz |
avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
Fixes: heap array overread
Fixes: asan_heap-oob_149b2bc_6577_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.h')
-rw-r--r-- | libavcodec/mjpegdec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 1ec241b1e6..1317404219 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -137,7 +137,8 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s); int ff_mjpeg_decode_dht(MJpegDecodeContext *s); int ff_mjpeg_decode_sof(MJpegDecodeContext *s); int ff_mjpeg_decode_sos(MJpegDecodeContext *s, - const uint8_t *mb_bitmask, const AVFrame *reference); + const uint8_t *mb_bitmask,int mb_bitmask_size, + const AVFrame *reference); int ff_mjpeg_find_marker(MJpegDecodeContext *s, const uint8_t **buf_ptr, const uint8_t *buf_end, const uint8_t **unescaped_buf_ptr, int *unescaped_buf_size); |