aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-08 09:27:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-14 23:30:37 +0100
commit25d3ae96972f8760182ff84d4117084dff54579a (patch)
treee902db5810a6d46ccdca8e42c2ee895b6ea2acd4
parent30047c052d9d5591f69c8170763e80b5d4a2349b (diff)
downloadffmpeg-25d3ae96972f8760182ff84d4117084dff54579a.tar.gz
avformat/wsddec: Fix undefined shift
Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 15123/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5738039235575808 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 112eb17a2bbf6d02f81fdf0743b353a6b010aedc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/wsddec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wsddec.c b/libavformat/wsddec.c
index 81a4dcc71e..a6bddec138 100644
--- a/libavformat/wsddec.c
+++ b/libavformat/wsddec.c
@@ -137,7 +137,7 @@ static int wsd_read_header(AVFormatContext *s)
if (!(channel_assign & 1)) {
int i;
for (i = 1; i < 32; i++)
- if (channel_assign & (1 << i))
+ if ((channel_assign >> i) & 1)
st->codecpar->channel_layout |= wsd_to_av_channel_layoyt(s, i);
}