Commit 19dc5cda authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/lzw: Check for end of input

Fixes: Timeout
Fixes: 11873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5093495044308992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 70c68e65
......@@ -71,6 +71,9 @@ static int lzw_get_code(struct LZWState * s)
{
int c;
if (s->bbits < s->cursize && bytestream2_get_bytes_left(&s->gb) <= 0)
return s->end_code;
if(s->mode == FF_LZW_GIF) {
while (s->bbits < s->cursize) {
if (!s->bs) {
......
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