[FFmpeg-cvslog] avcodec/aacdec_templat: Fix integer overflow in apply_ltp()

Michael Niedermayer git at videolan.org
Tue Feb 27 23:00:35 EET 2018


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 18 16:55:52 2018 +0100| [6648d3fef6b07f3ec0b60ec4b5ec08aa5e1964ca] | committer: Michael Niedermayer

avcodec/aacdec_templat: Fix integer overflow in apply_ltp()

Fixes: signed integer overflow: -1625276744 + -1041893960 cannot be represented in type 'int'
Fixes: 5948/clusterfuzz-testcase-minimized-5791479856365568

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 33fe17bdc88d51a8e0c87aa1e8011aaaf38a7a90)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6648d3fef6b07f3ec0b60ec4b5ec08aa5e1964ca
---

 libavcodec/aacdec_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 3cb8f32403..f21d215c9e 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2496,7 +2496,7 @@ static void apply_ltp(AACContext *ac, SingleChannelElement *sce)
         for (sfb = 0; sfb < FFMIN(sce->ics.max_sfb, MAX_LTP_LONG_SFB); sfb++)
             if (ltp->used[sfb])
                 for (i = offsets[sfb]; i < offsets[sfb + 1]; i++)
-                    sce->coeffs[i] += predFreq[i];
+                    sce->coeffs[i] += (UINTFLOAT)predFreq[i];
     }
 }
 



More information about the ffmpeg-cvslog mailing list