diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 07:05:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 07:34:17 +0400 |
commit | bd358e128f47c14c7bc9dfceb8dedb3e5697f017 (patch) | |
tree | 928fe936137f4bd4558f39e27fb29c7d8e401b47 /libavcodec/jpegls.h | |
parent | 42d4df06e178768aee61cf21db1d3969a2fa4c03 (diff) |
jpeglsdec: fix infinite loop
Fixes Ticket331
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpegls.h')
-rw-r--r-- | libavcodec/jpegls.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/jpegls.h b/libavcodec/jpegls.h index 28c75248be..2c21f774e8 100644 --- a/libavcodec/jpegls.h +++ b/libavcodec/jpegls.h @@ -86,6 +86,8 @@ 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) + return -0x10000; state->A[Q] += FFABS(err); err *= state->twonear; state->B[Q] += err; |