[FFmpeg-cvslog] avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()

Michael Niedermayer git at videolan.org
Thu Oct 21 22:39:44 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 28 00:11:50 2021 +0200| [bda2d4989609e6be284575c5bc55a6deba3034d7] | committer: Michael Niedermayer

avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()

Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int'
Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208

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

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

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

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 904e433a3d..3ce4484686 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -979,7 +979,7 @@ static void long_filter_ehigh_3830(int32_t *buffer, int length)
         for (j = 7; j > 0; j--)
             delay[j] = delay[j - 1];
         delay[0] = buffer[i];
-        buffer[i] -= dotprod >> 9;
+        buffer[i] -= (unsigned)(dotprod >> 9);
     }
 }
 



More information about the ffmpeg-cvslog mailing list