mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-23 23:36:57 +00:00
avcodec/jpeglsdec: Check for end of bitstream in ls_decode_line()
Fixes: 1773/clusterfuzz-testcase-minimized-4832523987189760
Fixes: Timeout
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f80224ed19
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
374a2d2250
commit
7373064247
@ -233,6 +233,9 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s,
|
||||
while (x < w) {
|
||||
int err, pred;
|
||||
|
||||
if (get_bits_left(&s->gb) <= 0)
|
||||
return;
|
||||
|
||||
/* compute gradients */
|
||||
Ra = x ? R(dst, x - stride) : R(last, x);
|
||||
Rb = R(last, x);
|
||||
|
Loading…
Reference in New Issue
Block a user