diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 05:05:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 17:57:01 +0200 |
commit | d99613bad60cd2640d15725581ef8fe14d9a6258 (patch) | |
tree | 14e546b5baf4464a32f160acf760c960ba3c7455 | |
parent | 64556c200ee372130bcebb79f0fb37a9aa46f9c5 (diff) | |
download | ffmpeg-d99613bad60cd2640d15725581ef8fe14d9a6258.tar.gz |
jpeglsdec: fix infinite loop
Fixes Ticket331
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bd358e128f47c14c7bc9dfceb8dedb3e5697f017)
-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; |