[FFmpeg-cvslog] avcodec/h264: Clear delayed_pic on deallocation
Michael Niedermayer
git at videolan.org
Fri Dec 19 16:08:43 CET 2014
ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 21:27:37 2014 +0100| [a9c77e5c227bc8c23778def2f7180b987d4da5c5] | committer: Michael Niedermayer
avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory
Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf at coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e8714f6f93d1a32f4e4655209960afcf4c185214)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9c77e5c227bc8c23778def2f7180b987d4da5c5
---
libavcodec/h264.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 12713de..7914c46 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -391,6 +391,7 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
if (free_rbsp && h->DPB) {
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
ff_h264_unref_picture(h, &h->DPB[i]);
+ memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
av_freep(&h->DPB);
} else if (h->DPB) {
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
More information about the ffmpeg-cvslog
mailing list