mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
parser: fix large overreads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1e2e2c8095
commit
6a697b42d0
@ -261,6 +261,7 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
|
|||||||
if(!new_buffer)
|
if(!new_buffer)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
pc->buffer = new_buffer;
|
pc->buffer = new_buffer;
|
||||||
|
if(FF_INPUT_BUFFER_PADDING_SIZE > -next)
|
||||||
memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
|
memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
|
||||||
pc->index = 0;
|
pc->index = 0;
|
||||||
*buf= pc->buffer;
|
*buf= pc->buffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user