[FFmpeg-cvslog] avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()

Michael Niedermayer git at videolan.org
Sun Dec 4 22:13:02 EET 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec  3 17:05:43 2016 +0100| [2d66fbc853ff7d22c30a597fe548e3ff952a1dc7] | committer: Michael Niedermayer

avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()

Fixes undefined behavior
Fixes: 640912-media

Found-by: Matt Wolenetz <wolenetz at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 83a75bf6c31b3c0ce2ca7e1426d1f2e3df634239)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/flacdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index b7237e1..5f5802c 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -268,7 +268,8 @@ static int decode_subframe_fixed(FLACContext *s, int32_t *decoded,
                                  int pred_order, int bps)
 {
     const int blocksize = s->blocksize;
-    int av_uninit(a), av_uninit(b), av_uninit(c), av_uninit(d), i;
+    unsigned av_uninit(a), av_uninit(b), av_uninit(c), av_uninit(d);
+    int i;
     int ret;
 
     /* warm up samples */



More information about the ffmpeg-cvslog mailing list