fdk-aac/libSACdec
Martin Storsjo 845febbb4a Don't store a value read directly from the bitstream in an enum
In this case, the enum only has one single allowed value, while the
bitstream can contain a number of different values.

Don't load the unchecked value into an enum variable, because
storing the disallowed values in the enum variable is undefined
behaviour. Instead store it in an int, until the value has been
verified to be the allowed one.

This fixes undefined behaviour sanitizer errors.

Fixes: 23192/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5205702892322816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-06-12 10:29:11 +03:00
..
include Add AOT specific number of qmf bands sanity check in SpatialSpecificConfig() 2019-01-03 10:25:40 -05:00
src Don't store a value read directly from the bitstream in an enum 2020-06-12 10:29:11 +03:00