aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-04 00:11:17 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-04 01:05:02 +0100
commit3f8bb78f3ed605152a0954d81b40738166eda7df (patch)
tree7794907770734a1ea68998b2cb29cf79521ca5c7
parenta5989651f0759059f9e08906685e6cec77f518d9 (diff)
downloadffmpeg-3f8bb78f3ed605152a0954d81b40738166eda7df.tar.gz
avcodec/flacdec: Fix undefined shift in decode_subframe()
Fixes undefined behavior Fixes: 639961-media Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1f5630af51f24d79053b6bef5b8b3ba93d637306) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/flacdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 0c4ab43457..65edac262e 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -448,7 +448,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
if (wasted) {
int i;
for (i = 0; i < s->blocksize; i++)
- decoded[i] <<= wasted;
+ decoded[i] = (unsigned)decoded[i] << wasted;
}
return 0;