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, 16 Jul 2018 17:06:27 +0000 (19:06 +0200)
commitfdab123c031250742ea84c188999a855baa4bf30
tree8cdc00e4394ce5d96e9dde50da2c8a372e6dda27
parentb0207c5b2a82cc9a7c80640977a004053e2d6ecf
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