avcodec/alac: Check lpc_quant
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 18 Jun 2019 23:04:07 +0000 (01:04 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 8 Jul 2019 09:41:51 +0000 (11:41 +0200)
commitac9d8e7c501cc1118d99b6226a7fbef4e0578c72
tree4777d89407d19846a4f4519c16ab3765fe04701c
parentc697819aee7ff44181077859ca5f0962049272e2
avcodec/alac: Check lpc_quant

lpc_quant of 0 produces undefined behavior, thus disallow this.
If valid samples use this then such a sample would be quite
usefull to confirm the correct&lossles handling of this.

Fixes: libavcodec/alac.c:218:25: runtime error: shift exponent -1 is negative
Fixes: 15273/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5656388535058432
Fixes: 15276/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5761238417539072
Fixes: 15315/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5767260766994432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a6474b899c1153e3bb95e399b6605c3507aea0d0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/alac.c