Module: libav Branch: master Commit: 096abfa15052977eed93f0b5e01afd2d47c53c1f
Author: Michael Niedermayer <[email protected]> Committer: Justin Ruggles <[email protected]> Date: Wed Oct 3 16:06:23 2012 +0200 parser: fix large overreads Signed-off-by: Michael Niedermayer <[email protected]> Signed-off-by: Justin Ruggles <[email protected]> --- libavcodec/parser.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 7ace766..0767a34 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -254,7 +254,9 @@ 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; - memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE ); + if (next > -FF_INPUT_BUFFER_PADDING_SIZE) + memcpy(&pc->buffer[pc->index], *buf, + next + FF_INPUT_BUFFER_PADDING_SIZE); pc->index = 0; *buf= pc->buffer; } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
