diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-04 00:13:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-04 00:21:17 +0200 |
commit | 075a165d2715837d125a9cc714fb430ccf6c9d6b (patch) | |
tree | 61c9f5eeaaac620546b148cc59d21c41aacff1f2 /libavcodec/svq3.c | |
parent | c727401aa9d62335e89d118a5b4e202edf39d905 (diff) | |
download | ffmpeg-075a165d2715837d125a9cc714fb430ccf6c9d6b.tar.gz |
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>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 97233b19d6..9459329058 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1176,7 +1176,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(H264Picture, tf)); ret = av_frame_ref(&h->cur_pic.f, &s->cur_pic->f); if (ret < 0) return ret; |