[FFmpeg-cvslog] avcodec/lagarith: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Tue May 23 17:25:24 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue May 23 14:34:00 2017 +0200| [948b54763b6c851b2a0bec6702cd9c419065fdb6] | committer: Michael Niedermayer
avcodec/lagarith: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 1764/clusterfuzz-testcase-minimized-5394243164045312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=948b54763b6c851b2a0bec6702cd9c419065fdb6
---
libavcodec/lagarith.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 1f4afc5312..860381746d 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -91,7 +91,7 @@ static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
uint64_t h = x * (mantissa >> 32);
h += l >> 32;
l &= 0xffffffff;
- l += 1 << av_log2(h >> 21);
+ l += 1LL << av_log2(h >> 21);
h += l >> 32;
return h >> 20;
}
More information about the ffmpeg-cvslog
mailing list