diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-17 21:27:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-20 03:27:17 +0100 |
commit | 25dc978bb1b50a94fae5e66779c87ece76bde323 (patch) | |
tree | a70a69b764af6074976dcc5d96dad7aad9854fd1 | |
parent | 13838647ca63b494d5d80698e093f57a62f61e4b (diff) | |
download | ffmpeg-25dc978bb1b50a94fae5e66779c87ece76bde323.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
-rw-r--r-- | libavcodec/h264.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 6aa20f5375..ab4d211be6 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1233,6 +1233,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); |