mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/dirac_parser: Fix undefined memcpy() use
Fixes: 9d375e415486edd1a0c826f2307d89a4/asan_generic_4a5159_1577_faa333e83dacdd9e4dd322380aeed537.iss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit daefd8ab2f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bcedc2b0f0
commit
327dd70690
|
@ -123,7 +123,7 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||||
DiracParseContext *pc = s->priv_data;
|
DiracParseContext *pc = s->priv_data;
|
||||||
|
|
||||||
if (pc->overread_index) {
|
if (pc->overread_index) {
|
||||||
memcpy(pc->buffer, pc->buffer + pc->overread_index,
|
memmove(pc->buffer, pc->buffer + pc->overread_index,
|
||||||
pc->index - pc->overread_index);
|
pc->index - pc->overread_index);
|
||||||
pc->index -= pc->overread_index;
|
pc->index -= pc->overread_index;
|
||||||
pc->overread_index = 0;
|
pc->overread_index = 0;
|
||||||
|
|
Loading…
Reference in New Issue