avcodec/hevc_refs: Check nb_refs in add_candidate_ref()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 14 Jun 2017 23:26:01 +0000 (01:26 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 23 Aug 2017 11:15:18 +0000 (13:15 +0200)
commit947961a6dc989d5532753cf187b3b7830acf3e5d
treed81c946b4d0277196875f5f93aa4c1e447508fea
parente33febfb86b892d2e1e1aa62e26c3719e0d7553b
avcodec/hevc_refs: Check nb_refs in add_candidate_ref()

Fixes: runtime error: index 16 out of bounds for type 'int [16]'
Fixes: 2209/clusterfuzz-testcase-minimized-5012343912136704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1cb4ef526dd1e5f547d0354efb0831d07e967919)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/hevc_refs.c