diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-26 23:24:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-28 20:13:59 +0100 |
commit | 560daf88913b0de59a4d845bcd19254b406388dd (patch) | |
tree | 1cd91f6467d6a56e9e93ea0656e338e6a2d909a9 /libavcodec/flacdec.c | |
parent | be4dfbf7b71e44a53ca8da882a081e35ea134c83 (diff) | |
download | ffmpeg-560daf88913b0de59a4d845bcd19254b406388dd.tar.gz |
avcodec/flacdec: avoid undefined shift
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 4688/clusterfuzz-testcase-minimized-6572210748653568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/flacdec.c')
-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 6c8ba15777..64bea76f98 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -460,7 +460,7 @@ static inline int decode_subframe(FLACContext *s, int channel) return AVERROR_INVALIDDATA; } - if (wasted) { + if (wasted && wasted < 32) { int i; for (i = 0; i < s->blocksize; i++) decoded[i] = (unsigned)decoded[i] << wasted; |