mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/jpeglsdec: Increase range for N in ls_get_code_runterm() by using unsigned
Fixes: left shift of 32768 by 16 places cannot be represented in type 'int' Fixes: Timeout Fixes: 44219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4679455379947520 Fixes: 44088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4885976600674304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5038933977
commit
6ee283d7d0
@ -191,7 +191,7 @@ static inline int ls_get_code_runterm(GetBitContext *gb, JLSState *state,
|
||||
if (RItype)
|
||||
temp += state->N[Q] >> 1;
|
||||
|
||||
for (k = 0; (state->N[Q] << k) < temp; k++)
|
||||
for (k = 0; ((unsigned)state->N[Q] << k) < temp; k++)
|
||||
;
|
||||
|
||||
#ifdef JLS_BROKEN
|
||||
|
Loading…
Reference in New Issue
Block a user