avcodec/bgmc: Check input space in ff_bgmc_decode_init()
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 1 Sep 2019 20:31:45 +0000 (22:31 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Sep 2019 18:26:35 +0000 (20:26 +0200)
commit517fd68acd7e7a5472fa3c42d2f833773fbcb5b3
tree97bee68b5ea0de30117321a790fe3ddece4ce941
parent69db79074fef414d196bfae0bf9bf7afa24fa33c
avcodec/bgmc: Check input space in ff_bgmc_decode_init()

Fixes: Infinite loop
Fixes: 16608/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5636229827133440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b54031a6e93d1abc7fb2d0263e0f6c4b639e423f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/alsdec.c
libavcodec/bgmc.c
libavcodec/bgmc.h