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, 19 Jul 2017 13:26:37 +0000 (15:26 +0200)
commitf8a331598efe22821e4d1f96971adbf716652a7b
tree80dfdfc776b09d439e7c114439aaf143d2555207
parentf33c3ccbe747b63ddb495cfcf7159e222f86ed7d
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