avcodec/mlpdec: Only change noise_type if the related fields are valid
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 17 May 2018 11:58:46 +0000 (13:58 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 8 Jul 2018 17:45:46 +0000 (19:45 +0200)
commit99b4524bfb45f5c6e0672229f2da1a2b93622f15
tree0913020c06b4ffb304eb026144b5af84940d48d9
parent2a9f93d8b0e6c3d4c38ca3b3ff955b283519df86
avcodec/mlpdec: Only change noise_type if the related fields are valid

Fixes: inconsistency
Fixes:runtime error: index 8 out of bounds for type 'int32_t [8]'
Fixes: 6686/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5191383498358784

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 63c4a4b0d692bc86142790276358ba35129f2290)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mlpdec.c