mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 11:47:04 +00:00
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@niedermayer.cc>
(cherry picked from commit 62c5949bec
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
10ed53cae7
commit
f0dc692518
@ -80,6 +80,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user