You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02: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:
@@ -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)
|
if (s->last_picture_ptr)
|
||||||
ff_copy_picture(&s->last_picture, s->last_picture_ptr);
|
ff_copy_picture(&s->last_picture, s->last_picture_ptr);
|
||||||
if (s->next_picture_ptr)
|
if (s->next_picture_ptr)
|
||||||
|
Reference in New Issue
Block a user