diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-03 17:05:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | a9479bbc5711de0d33675b614372e9d3647e1aa5 (patch) | |
tree | 6213dcb7124d2e7931bcde75e330bb132484b95e | |
parent | 483204b5c42e7e34845c0f500bcba656d3cd268a (diff) | |
download | ffmpeg-a9479bbc5711de0d33675b614372e9d3647e1aa5.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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index a48b177828..da4d770aba 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -261,7 +261,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 */ |