mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 09:35:22 +00:00
avcodec/jpeglsdec: check shift for values that cause overflow later
Fixes: 657/clusterfuzz-testcase-6674741433729024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
76ba09d182
commit
e98dfeb27c
@ -375,6 +375,11 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
|
||||
else
|
||||
shift = point_transform + (16 - s->bits);
|
||||
|
||||
if (shift >= 16) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
|
||||
av_log(s->avctx, AV_LOG_DEBUG,
|
||||
"JPEG-LS params: %ix%i NEAR=%i MV=%i T(%i,%i,%i) "
|
||||
|
Loading…
Reference in New Issue
Block a user