Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-04 02:13:26 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-11-28 20:53:19 +0300
commite4f0f854c47630826f28cf899fa91f3de6e73de9 (patch)
treef7858034ad5caaa26c33c6b759f8810ed9c1e6ea
parent35cfb99c15ddfbeae1f2f702091a7b8122c2d514 (diff)
avcodec/svq3: Dont memcpy AVFrame
This avoids out of array accesses Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 075a165d2715837d125a9cc714fb430ccf6c9d6b) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/svq3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 89bb616797..a983dce7cd 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1157,7 +1157,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
h->cur_pic_ptr = s->cur_pic;
av_frame_unref(&h->cur_pic.f);
- h->cur_pic = *s->cur_pic;
+ memcpy(&h->cur_pic.tf, &s->cur_pic->tf, sizeof(h->cur_pic) - offsetof(Picture, tf));
ret = av_frame_ref(&h->cur_pic.f, &s->cur_pic->f);
if (ret < 0)
return ret;