diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 05:05:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 05:34:17 +0200 |
commit | bd358e128f47c14c7bc9dfceb8dedb3e5697f017 (patch) | |
tree | 928fe936137f4bd4558f39e27fb29c7d8e401b47 | |
parent | 42d4df06e178768aee61cf21db1d3969a2fa4c03 (diff) | |
download | ffmpeg-bd358e128f47c14c7bc9dfceb8dedb3e5697f017.tar.gz |
jpeglsdec: fix infinite loop
Fixes Ticket331
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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; |