[FFmpeg-cvslog] avcodec/flacdec: avoid undefined shift
Michael Niedermayer
git at videolan.org
Thu Feb 1 01:52:39 EET 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Dec 26 23:24:43 2017 +0100| [59e3f49ef0f3db4ef2ea06daf61bc965618f8485] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 560daf88913b0de59a4d845bcd19254b406388dd)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59e3f49ef0f3db4ef2ea06daf61bc965618f8485
---
libavcodec/flacdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 4ab2b420aa..a3bbb7a2ad 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -445,7 +445,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;
More information about the ffmpeg-cvslog
mailing list