avcodec/fits: Check bitpix
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 5 May 2019 16:38:33 +0000 (18:38 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 6 May 2019 21:58:34 +0000 (23:58 +0200)
commit0b5c93b276a14d1990aaabd77410a562f4b242c3
tree3e5ad40a973702b7c5e0c8f7f71d13dfe4d7a6fe
parente668260ba948f728a0dd7dbff289327c07b1e8b0
avcodec/fits: Check bitpix

Reference: Table 8: Interpretation of valid BITPIX value from FITS standard 4.0
Fixes: runtime error: division by zero
Fixes: 14581/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5652382425284608

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