diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-04 00:11:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | ac0cdddc783ea49a1680c8f1a37bc037dfe46ff0 (patch) | |
tree | f254f67ec7b1d8d115910fb9d3cb70e7a276f085 | |
parent | 2e7800778c8aadb3362797caca4b6daa8c6bf3a0 (diff) | |
download | ffmpeg-ac0cdddc783ea49a1680c8f1a37bc037dfe46ff0.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index da4d770aba..969fa8e1ac 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -406,7 +406,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; |