diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-12 04:45:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-12 04:46:08 +0100 |
commit | d9226b3717fda04c5cde8f51c4dc85fa735b1909 (patch) | |
tree | 442d8d7fc752480e1759d9752bffccbb236a522c /libavcodec | |
parent | cc548ea7a60355e15ed78431a55a896db074aa11 (diff) | |
download | ffmpeg-d9226b3717fda04c5cde8f51c4dc85fa735b1909.tar.gz |
mpegvideo: dont leave stale pointers in next/last picture
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 4609b0b731..4fd8062a0b 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1496,6 +1496,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) } } + memset(s->last_picture.f.data, 0, sizeof(s->last_picture.f.data)); + memset(s->next_picture.f.data, 0, sizeof(s->next_picture.f.data)); if (s->last_picture_ptr) ff_copy_picture(&s->last_picture, s->last_picture_ptr); if (s->next_picture_ptr) |