[FFmpeg-cvslog] avcodec/cllc: Check prefix
Michael Niedermayer
git at videolan.org
Sun May 14 19:44:34 EEST 2017
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Tue May 9 19:38:46 2017 +0200| [70d3ad7b6fb79b17c44193e9de402496f51ae27a] | committer: Michael Niedermayer
avcodec/cllc: Check prefix
Fixes: runtime error: left shift of 1610706944 by 1 places cannot be represented in type 'int'
Fixes: 1421/clusterfuzz-testcase-minimized-6239947507892224
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 62c5949beca2c95d6af5c74985467438d2295a66)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70d3ad7b6fb79b17c44193e9de402496f51ae27a
---
libavcodec/cllc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index ec11fc34b0..fe9583796f 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -81,6 +81,10 @@ static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc)
count++;
}
+ if (prefix > (65535 - 256)/2) {
+ vlc->table = NULL;
+ return AVERROR_INVALIDDATA;
+ }
prefix <<= 1;
}
More information about the ffmpeg-cvslog
mailing list