Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-05 22:41:08 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-14 00:39:50 +0300
commit07b7a4be0ad847e4a05a31ba85092ceaec4faccf (patch)
tree88d7abb0a70e7c51f35c9c244d9ce59e36397e87 /libavcodec
parent79d52d06683c46a0343bb6220433e0c7480744d6 (diff)
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> (cherry picked from commit 6ee283d7d001cfcfec94a023e172bca731e96514) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeglsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index a8d9eaa18a..0cb40cc0f1 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -186,7 +186,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