Commit 58e212c1 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/jpeglsdec: check err value for ls_get_code_runterm()


Fixes infinite loop
Fixes Ticket3086
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc0e47b5

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 4ddbe89d
No related merge requests found
Showing with 2 additions and 0 deletions
+2 -0
......@@ -143,6 +143,8 @@ static inline int ls_get_code_runterm(GetBitContext *gb, JLSState *state, int RI
ret = ret >> 1;
}
if(FFABS(ret) > 0xFFFF)
return -0x10000;
/* update state */
state->A[Q] += FFABS(ret) - RItype;
ret *= state->twonear;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment