[FFmpeg-devel,6/6] vcodec/apedec: Fix integer overflow in filter_3800()

Submitted by Michael Niedermayer on Aug. 17, 2019, 11:28 p.m.

Details

Message ID 20190817232841.14709-6-michael@niedermayer.cc
State Accepted
Commit 8ae5d2cbb254e9e967184b2aad6fa43fe2780eaf
Headers show

Commit Message

Michael Niedermayer Aug. 17, 2019, 11:28 p.m.
Fixes: signed integer overflow: 2021654528 + 2032575680 cannot be represented in type 'int'
Fixes: 16270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5732438816325632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/apedec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 2, 2019, 4:42 p.m.
On Sun, Aug 18, 2019 at 01:28:41AM +0200, Michael Niedermayer wrote:
> Fixes: signed integer overflow: 2021654528 + 2032575680 cannot be represented in type 'int'
> Fixes: 16270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5732438816325632
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/apedec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 5d82ff53ff..490b11b94e 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -842,7 +842,7 @@  static av_always_inline int filter_fast_3320(APEPredictor *p,
 }
 
 static av_always_inline int filter_3800(APEPredictor *p,
-                                        const int decoded, const int filter,
+                                        const unsigned decoded, const int filter,
                                         const int delayA,  const int delayB,
                                         const int start,   const int shift)
 {