[FFmpeg-cvslog] avcodec/dirac_parser: Fix undefined memcpy() use

Michael Niedermayer git at videolan.org
Thu Nov 12 04:07:47 CET 2015


ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov  6 21:58:42 2015 +0100| [327dd70690a13313e77dec46de8bc03efd06ba5e] | committer: Michael Niedermayer

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 at niedermayer.cc>
(cherry picked from commit daefd8ab2f2aeb90cd53cb75445faffdc7a3cc79)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/dirac_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c
index 45ded5a..83c35a2 100644
--- a/libavcodec/dirac_parser.c
+++ b/libavcodec/dirac_parser.c
@@ -123,7 +123,7 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
     DiracParseContext *pc = s->priv_data;
 
     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->overread_index = 0;



More information about the ffmpeg-cvslog mailing list