diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-26 23:24:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-28 15:31:14 +0100 |
commit | 91f5a2b7b88aaba20800c5363aef49b14811b4c9 (patch) | |
tree | 694ca60181b4b0786a2e0bceebc5ac88941f1777 | |
parent | 7e402c31efd8fc332175121b2d901eb16ed5614a (diff) | |
download | ffmpeg-91f5a2b7b88aaba20800c5363aef49b14811b4c9.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 3d23f7a0969bf76ad6dcdc2c4a5cd3ae884745a8)
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 5bbb8ee5b9..3d41a1af7f 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -298,7 +298,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: |