aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-03 16:06:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-03 16:14:59 +0200
commit6a697b42d0c8469c05e2a1a0920d8539ba7b068d (patch)
tree6ac747ebd9f740be703d6f2bc38956e0327eca2e
parent1e2e2c8095de2d9ea3259305cfeff28f40e4ca12 (diff)
downloadffmpeg-6a697b42d0c8469c05e2a1a0920d8539ba7b068d.tar.gz
parser: fix large overreads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index a85db1a02f..127ba8bd3d 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;