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>
Mon, 9 Jul 2018 23:52:56 +0000 (01:52 +0200)
commit3d4e0858d68bce81f25bbab4ac912d971175daaf
tree8bdd397a68005f376c9e923e4ed469dd2cbe32b5
parent931f83773119649a975ddeea727950fbc36810a3
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