OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dac51d2
)
avcodec/h264_slice: Clear ref_counts on redundant slices
author
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 8 Feb 2017 16:55:41 +0000
(17:55 +0100)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 8 Feb 2017 17:31:04 +0000
(18:31 +0100)
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>
libavcodec/h264_slice.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264_slice.c
b/libavcodec/h264_slice.c
index
6b555ab
..
91a3b25
100644
(file)
--- a/
libavcodec/h264_slice.c
+++ b/
libavcodec/h264_slice.c
@@
-1999,8
+1999,10
@@
int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal)
return ret;
// 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;
+ }
if (sl->first_mb_addr == 0 || !h->current_slice) {
if (h->setup_finished) {