diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-09 13:56:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-09 13:56:46 +0100 |
commit | e7d924da30f0bd3cb680f45246526d312d2d2d6f (patch) | |
tree | 6938925b2a1bd03e539797e75cac2b7686999007 | |
parent | 5de1f7a7bd8a69d1cbf4f31816f996c99d545a10 (diff) | |
parent | 91ac403b1316d59b4f43c4ea0f237e24cec2819a (diff) | |
download | ffmpeg-e7d924da30f0bd3cb680f45246526d312d2d2d6f.tar.gz |
Merge commit '91ac403b1316d59b4f43c4ea0f237e24cec2819a'
* commit '91ac403b1316d59b4f43c4ea0f237e24cec2819a':
lavf: fix arithmetic overflows in avformat_seek_file()
mjpeg: initialize input padding after unescaped buffer to zero
Conflicts:
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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 cb500d481e..625dce4699 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1557,6 +1557,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, } *unescaped_buf_ptr = s->buffer; *unescaped_buf_size = dst - s->buffer; + memset(s->buffer + *unescaped_buf_size, 0, + FF_INPUT_BUFFER_PADDING_SIZE); av_log(s->avctx, AV_LOG_DEBUG, "escaping removed %td bytes\n", (buf_end - *buf_ptr) - (dst - s->buffer)); @@ -1598,6 +1600,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, *unescaped_buf_ptr = dst; *unescaped_buf_size = (bit_count + 7) >> 3; + memset(s->buffer + *unescaped_buf_size, 0, + FF_INPUT_BUFFER_PADDING_SIZE); } else { *unescaped_buf_ptr = *buf_ptr; *unescaped_buf_size = buf_end - *buf_ptr; |