diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-04 00:11:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-04 20:25:15 +0100 |
commit | 2c6792b0c68375a87aa1b6731b411d548bc1af05 (patch) | |
tree | f308af2d451d6b02e48d0c0e65c493ef8979daf8 | |
parent | 66bf84e2c4e14f18d96fc3dc495aadc3a9e8ec75 (diff) | |
download | ffmpeg-2c6792b0c68375a87aa1b6731b411d548bc1af05.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 5f5802c97f..4dde0e0591 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; |