aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
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:17:32 +0100
commita9c0f905aa3bd5342ffa3a0e9d54172d4c541903 (patch)
treeac19ba354704a1a1dc55661b067b008688b76fc3 /libavcodec
parent42b7d224bc5918f495cf18a79851be6eb88598ee (diff)
downloadffmpeg-a9c0f905aa3bd5342ffa3a0e9d54172d4c541903.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) Conflicts: libavcodec/h264.c
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index dbed0f0a7f..37f770e0b3 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1043,6 +1043,7 @@ static void free_tables(H264Context *h, int free_rbsp)
av_freep(&h->visualization_buffer[i]);
if (free_rbsp) {
+ memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
for (i = 0; i < h->picture_count && !h->avctx->internal->is_copy; i++)
free_picture(h, &h->DPB[i]);
av_freep(&h->DPB);