summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-11-21 22:59:55 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2023-03-27 13:37:13 +0200
commitf547b05e78414bf31a37003b55e782e70512af98 (patch)
tree99209e075c391ac18cbad9c57601b42f8962b411 /libavcodec
parent1f07ecd6329602c34a18291990e9906db9bd6631 (diff)
downloadffmpeg-f547b05e78414bf31a37003b55e782e70512af98.tar.gz
avcodec/mlpdec: Check max matrix instead of max channel in noise check
This is a regression since: adaa06581c5444c94eef72d61b8166f096e2687a Before this, max_channel and max_matrix_channel where compared for equality Fixes: out of array access Fixes: 53340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-514959011885875 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 aa79560de5e9596ada0345e5d12aa00dbeddaaa6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mlpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 29fac54542..5bc38048fb 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -529,7 +529,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
/* This should happen for TrueHD streams with >6 channels and MLP's noise
* type. It is not yet known if this is allowed. */
- if (max_channel > MAX_MATRIX_CHANNEL_MLP && !noise_type) {
+ if (max_matrix_channel > MAX_MATRIX_CHANNEL_MLP && !noise_type) {
avpriv_request_sample(m->avctx,
"%d channels (more than the "
"maximum supported by the decoder)",