X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fjpegls.h;h=aac67bbe3197a295c478c020edc85135d302dd90;hb=d5fc16a6a87a24360312b812a560e7a3664e3791;hp=6b89b2afa3dfe195466244b241bce6be36149211;hpb=26148e923613e718787c6fc4bf3f64e8909f597c;p=ffmpeg diff --git a/libavcodec/jpegls.h b/libavcodec/jpegls.h index 6b89b2afa3d..aac67bbe319 100644 --- a/libavcodec/jpegls.h +++ b/libavcodec/jpegls.h @@ -34,10 +34,6 @@ #undef near /* This file uses struct member 'near' which in windows.h is defined as empty. */ -typedef struct JpeglsContext { - AVCodecContext *avctx; -} JpeglsContext; - typedef struct JLSState { int T1, T2, T3; int A[367], B[367], C[365], N[367]; @@ -99,7 +95,7 @@ static inline void ff_jpegls_downscale_state(JLSState *state, int Q) static inline int ff_jpegls_update_state_regular(JLSState *state, int Q, int err) { - if(FFABS(err) > 0xFFFF) + if(FFABS(err) > 0xFFFF || FFABS(err) > INT_MAX - state->A[Q]) return -0x10000; state->A[Q] += FFABS(err); err *= state->twonear;