avcodec/cbs_av1_syntax_template: Check ref_frame_idx before use
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 4 Aug 2019 07:51:26 +0000 (09:51 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 5 Aug 2019 15:53:14 +0000 (17:53 +0200)
commit8174e5c77d8a94b57b6b1bcbb90728cf8b08ab6b
tree1a522c12f2de7dd908c21860783ea0ae586588d6
parent392c028cd23d128f33d93b2159eed5de42f72b4d
avcodec/cbs_av1_syntax_template: Check ref_frame_idx before use

Fixes: index -1 out of bounds for type 'AV1ReferenceFrameState [8]'
Fixes: 16079/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5758807440883712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
See: [FFmpeg-devel] [PATCH 05/13] avcodec/cbs_av1_syntax_template: Check ref_frame_idx before use
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cbs_av1_syntax_template.c