[FFmpeg-cvslog] avcodec/alsdec: Fixes signed integer overflow in LSB addition

Michael Niedermayer git at videolan.org
Mon Jul 8 14:09:22 EEST 2019


ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jun 21 00:47:16 2019 +0200| [ed8e191bfb1f64612d9a751e5003f985d9adb402] | committer: Michael Niedermayer

avcodec/alsdec: Fixes signed integer overflow in LSB addition

Fixes: signed integer overflow: 8 * 536870912 cannot be represented in type 'int'
Fixes: 15281/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5744458785619968

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

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

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

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 96cfbbf1fe..4b69775414 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -867,7 +867,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
                     res >>= 1;
 
                     if (cur_k) {
-                        res  *= 1 << cur_k;
+                        res  *= 1U << cur_k;
                         res  |= get_bits_long(gb, cur_k);
                     }
                 }



More information about the ffmpeg-cvslog mailing list