avcodec/agm: More completely check size before using it
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 3 Apr 2019 00:12:28 +0000 (02:12 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 4 Apr 2019 09:31:17 +0000 (11:31 +0200)
commit8e3b01e20ebd82528c3302d6756f3c6dffa4bfb2
tree1ebab3f8757c463d628018f31484705d6d503e40
parentee16d14b0a29317f6118a209c4d0737b97b7f58f
avcodec/agm: More completely check size before using it

Fixes: out of array access
Fixes: 13997/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5701427252428800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/agm.c