[FFmpeg-cvslog] avcodec/h264: Clear delayed_pic on deallocation
Michael Niedermayer
git at videolan.org
Tue Dec 30 16:12:42 CET 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 21:27:37 2014 +0100| [84bc2cea237725de468f53dbba6d53140fae21c5] | 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)
Conflicts:
libavcodec/h264.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84bc2cea237725de468f53dbba6d53140fae21c5
---
libavcodec/h264.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7ea833f..1194fd9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1231,6 +1231,7 @@ static void free_tables(H264Context *h, int free_rbsp)
av_buffer_pool_uninit(&h->ref_index_pool);
if (free_rbsp && h->DPB) {
+ memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
for (i = 0; i < MAX_PICTURE_COUNT; i++)
unref_picture(h, &h->DPB[i]);
av_freep(&h->DPB);
More information about the ffmpeg-cvslog
mailing list