summaryrefslogtreecommitdiff
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-03-21 00:30:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-03-21 09:07:58 +0100
commit23e27a360e47b7c7825f3df22c6013d5066829e3 (patch)
tree7ff84f401b9490a11c9b439822ec13ad792191d1 /libavcodec/mlpdec.c
parent0c1f20c6c858b753effda274b58ef635d1924915 (diff)
avcodec/mlpdec: Use 64bit for channel layout
Fixes: shift exponent 33 is too large for 32-bit type 'int' Fixes: 45645/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5651350182035456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index e3fbaa62c7..5a4d272f78 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -208,7 +208,7 @@ static enum AVChannel thd_channel_layout_extract_channel(uint64_t channel_layout
return AV_CHAN_NONE;
for (i = 0; i < FF_ARRAY_ELEMS(thd_channel_order); i++)
- if (channel_layout & (1 << thd_channel_order[i]) && !index--)
+ if (channel_layout & (1ULL << thd_channel_order[i]) && !index--)
return thd_channel_order[i];
return AV_CHAN_NONE;
}