Commit d9226b37 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cc548ea7
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment