[FFmpeg-cvslog] parser: fix large overreads

Michael Niedermayer git at videolan.org
Wed Oct 3 16:42:34 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct  3 16:06:23 2012 +0200| [6a697b42d0c8469c05e2a1a0920d8539ba7b068d] | committer: Michael Niedermayer

parser: fix large overreads

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a697b42d0c8469c05e2a1a0920d8539ba7b068d
---

 libavcodec/parser.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index a85db1a..127ba8b 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -261,6 +261,7 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
         if(!new_buffer)
             return AVERROR(ENOMEM);
         pc->buffer = new_buffer;
+        if(FF_INPUT_BUFFER_PADDING_SIZE > -next)
         memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
         pc->index = 0;
         *buf= pc->buffer;



More information about the ffmpeg-cvslog mailing list