diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-08 17:55:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-08 20:32:01 +0100 |
commit | d20200d3035eaca615ef3e2aeaba0017ae4e87a9 (patch) | |
tree | d2b79a87b1bfaabf341d34e25ab877d3799fc9c6 | |
parent | 02a5e88ebc725b09f675bfcbbd4db1133e41708e (diff) | |
download | ffmpeg-d20200d3035eaca615ef3e2aeaba0017ae4e87a9.tar.gz |
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>
(cherry picked from commit c03029a835949fc0e68b4c6558ebcdc3ae137087)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a56f900a50..40c4ea1efe 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1023,7 +1023,8 @@ again: #endif } else context_count++; - } + } else + sl->ref_count[0] = sl->ref_count[1] = 0; break; case NAL_DPA: case NAL_DPB: |