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>
Thu, 27 Jun 2019 15:50:47 +0000 (17:50 +0200)
commit8c9e131d3a1eabb9bd181ff6ecac453e88dcf813
tree113fb66ea48d739e7c9e6c708c0292367f7842ed
parent0060dc62f1aa059527a6d48a36c2f3ab1c5dc26b
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>
(cherry picked from commit 0b5c93b276a14d1990aaabd77410a562f4b242c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/fits.c