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>
Thu, 15 Jun 2017 01:09:40 +0000 (03:09 +0200)
commit1cb4ef526dd1e5f547d0354efb0831d07e967919
tree5ea33da5a4c1c8d949acfd8483f8739c58073a9d
parente53c9065ca08a9153ecc73a6a8940bcc6d667e58
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>
libavcodec/hevc_refs.c