aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-17 21:27:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-17 22:14:34 +0100
commita9c77e5c227bc8c23778def2f7180b987d4da5c5 (patch)
treeed932117e9eb65b77aa1705d8c0db1fbffcb1b1a
parentde882ec2b15f02eed000f1ee357ab81344b18684 (diff)
downloadffmpeg-a9c77e5c227bc8c23778def2f7180b987d4da5c5.tar.gz
avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory Fixes: case5_av_frame_copy_props.mp4 Found-by: Michal Zalewski <lcamtuf@coredump.cx> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e8714f6f93d1a32f4e4655209960afcf4c185214) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 12713de56b..7914c46074 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++)