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, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commit3eff19d38806a6f219fd42d9f03abad0fafd1b1d
treef8b0ad111099b2d361fa1fd6c046bff3b47ea33e
parent876d3ee86209d1b1b86527f5121f1d1b0a412f7a
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