diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-01 20:29:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-01 20:49:31 +0200 |
commit | 87b98689726360f61bacb7681a05ba677a218751 (patch) | |
tree | 9726684f62ad3bbafe0d29d44fc222f606418050 /libavcodec | |
parent | 0c9283a03f177f682d64ce0ecd7bf817f1a40dca (diff) | |
download | ffmpeg-87b98689726360f61bacb7681a05ba677a218751.tar.gz |
h264: clear the ref lists when the reference are cleared.
Fixes reading of freed arrays (Ticket1498)
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_refs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 926a6cc40d..d68a7d8b0f 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -443,6 +443,9 @@ void ff_h264_remove_all_refs(H264Context *h){ h->short_ref[i]= NULL; } h->short_ref_count=0; + + memset(h->default_ref_list, 0, sizeof(h->default_ref_list)); + memset(h->ref_list, 0, sizeof(h->ref_list)); } /** |