Commit e7d924da authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '91ac403b'

* commit '91ac403b':
  lavf: fix arithmetic overflows in avformat_seek_file()
  mjpeg: initialize input padding after unescaped buffer to zero

Conflicts:
	libavformat/utils.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5de1f7a7 91ac403b
...@@ -1557,6 +1557,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, ...@@ -1557,6 +1557,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
} }
*unescaped_buf_ptr = s->buffer; *unescaped_buf_ptr = s->buffer;
*unescaped_buf_size = dst - 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", av_log(s->avctx, AV_LOG_DEBUG, "escaping removed %td bytes\n",
(buf_end - *buf_ptr) - (dst - s->buffer)); (buf_end - *buf_ptr) - (dst - s->buffer));
...@@ -1598,6 +1600,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, ...@@ -1598,6 +1600,8 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
*unescaped_buf_ptr = dst; *unescaped_buf_ptr = dst;
*unescaped_buf_size = (bit_count + 7) >> 3; *unescaped_buf_size = (bit_count + 7) >> 3;
memset(s->buffer + *unescaped_buf_size, 0,
FF_INPUT_BUFFER_PADDING_SIZE);
} else { } else {
*unescaped_buf_ptr = *buf_ptr; *unescaped_buf_ptr = *buf_ptr;
*unescaped_buf_size = buf_end - *buf_ptr; *unescaped_buf_size = buf_end - *buf_ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment