aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-03 17:05:43 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-04 20:25:15 +0100
commit2d66fbc853ff7d22c30a597fe548e3ff952a1dc7 (patch)
tree70bf264f07f98b82dd4cb721a12cad8008debd4f
parent2f26f3de780167c66f89ee74768fc82c1f599814 (diff)
downloadffmpeg-2d66fbc853ff7d22c30a597fe548e3ff952a1dc7.tar.gz
avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()
Fixes undefined behavior Fixes: 640912-media Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 83a75bf6c31b3c0ce2ca7e1426d1f2e3df634239) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/flacdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index b7237e18f0..5f5802c97f 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 */