aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-09-21 02:36:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-10-07 21:34:00 +0200
commitd7973cf03d07d002b3ded68b5358f4239c7e0de1 (patch)
tree114db69fd5eccb12bfc7ba3c1a7fd1059cf3d6b4
parent45fb50b4bc5d686329064ae7cc4bc0a93be64d6f (diff)
downloadffmpeg-d7973cf03d07d002b3ded68b5358f4239c7e0de1.tar.gz
avcodec/ac3dec: Fix shift signedness in mask creation
Fixes: 9924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5473421772193792 Fixes: left shift of 1 by 63 places cannot be represented in type 'long long' 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 148a21611d856609fc034147f4a27cfdb6d90ff4) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ac3dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index eed8ce5b39..43b22b7654 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1708,9 +1708,9 @@ dependent_frame:
int i;
for (i = 0; i < 64; i++) {
- if ((1LL << i) & ff_eac3_custom_channel_map_locations[ch][1]) {
+ if ((1ULL << i) & ff_eac3_custom_channel_map_locations[ch][1]) {
int index = av_get_channel_layout_channel_index(channel_layout,
- 1LL << i);
+ 1ULL << i);
if (index < 0)
return AVERROR_INVALIDDATA;
if (extend >= channel_map_size)