You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -443,6 +443,9 @@ void ff_h264_remove_all_refs(H264Context *h){
|
|||||||
h->short_ref[i]= NULL;
|
h->short_ref[i]= NULL;
|
||||||
}
|
}
|
||||||
h->short_ref_count=0;
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user