aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-01 20:29:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-01 20:49:31 +0200
commit87b98689726360f61bacb7681a05ba677a218751 (patch)
tree9726684f62ad3bbafe0d29d44fc222f606418050 /libavcodec
parent0c9283a03f177f682d64ce0ecd7bf817f1a40dca (diff)
downloadffmpeg-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.c3
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));
}
/**