mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
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>
This commit is contained in:
parent
cc548ea7a6
commit
d9226b3717
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user