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 17:34:33 +0000 (19:34 +0200)
commitf06fced6df9fd805fe670ace0ffd71a74d493943
treee8aedec4c160b923a5eaad47c508423c218c6a9d
parent739f93ebe1a2da7ec7072101dd354adfbe0b00f4
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>
(cherry picked from commit 8174e5c77d8a94b57b6b1bcbb90728cf8b08ab6b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cbs_av1_syntax_template.c