[FFmpeg-cvslog] avcodec/flacdec: Fix overflow in multiplication in decode_subframe_fixed()
Michael Niedermayer
git at videolan.org
Thu Feb 1 01:52:44 EET 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Dec 26 23:24:44 2017 +0100| [2a53778676d068456bf245126d15eeb6f537da9a] | committer: Michael Niedermayer
avcodec/flacdec: Fix overflow in multiplication in decode_subframe_fixed()
Fixes: signed integer overflow: 2 * 1629495328 cannot be represented in type 'int'
Fixes: 4716/clusterfuzz-testcase-minimized-5835915940331520
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 3d23f7a0969bf76ad6dcdc2c4a5cd3ae884745a8)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a53778676d068456bf245126d15eeb6f537da9a
---
libavcodec/flacdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index a3bbb7a2ad..237a03a1d3 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -287,7 +287,7 @@ static int decode_subframe_fixed(FLACContext *s, int32_t *decoded,
if (pred_order > 2)
c = b - decoded[pred_order-2] + decoded[pred_order-3];
if (pred_order > 3)
- d = c - decoded[pred_order-2] + 2*decoded[pred_order-3] - decoded[pred_order-4];
+ d = c - decoded[pred_order-2] + 2U*decoded[pred_order-3] - decoded[pred_order-4];
switch (pred_order) {
case 0:
More information about the ffmpeg-cvslog
mailing list