mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/h264_slice: Clear ref_counts on redundant slices
Fixes reading freed memory Fixes: 568/clusterfuzz-testcase-6107186067406848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
dac51d2bbd
commit
c03029a835
@ -1999,8 +1999,10 @@ int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
// discard redundant pictures
|
// discard redundant pictures
|
||||||
if (sl->redundant_pic_count > 0)
|
if (sl->redundant_pic_count > 0) {
|
||||||
|
sl->ref_count[0] = sl->ref_count[1] = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (sl->first_mb_addr == 0 || !h->current_slice) {
|
if (sl->first_mb_addr == 0 || !h->current_slice) {
|
||||||
if (h->setup_finished) {
|
if (h->setup_finished) {
|
||||||
|
Loading…
Reference in New Issue
Block a user