avcodec/wmaprodec: Check if there is a stream
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 2 Oct 2019 17:26:51 +0000 (19:26 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Oct 2019 17:37:10 +0000 (19:37 +0200)
commit9b533de28eb19c660c75823ff2af2f8549c4095a
tree9aa72781219fe7882e0f98110ded3131a3bd0dce
parentbe0d3a2df1a1ec627ba50f535f61f7fcd359f6a4
avcodec/wmaprodec: Check if there is a stream

Fixes: null pointer dereference
Fixes: signed integer overflow: 512 * 2147483647 cannot be represented in type 'int'
Fixes: 17809/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5634409947987968

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/wmaprodec.c