Commit a453bbb6 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/swfdec: Fix inflate() error code check

Fixes infinite loop
Fixes endless.poc
Found-by: 's avatar连一汉 <lianyihan@360.cn>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2a3720bc
......@@ -119,10 +119,10 @@ retry:
z->avail_out = buf_size;
ret = inflate(z, Z_NO_FLUSH);
if (ret < 0)
return AVERROR(EINVAL);
if (ret == Z_STREAM_END)
return AVERROR_EOF;
if (ret != Z_OK)
return AVERROR(EINVAL);
if (buf_size - z->avail_out == 0)
goto retry;
......
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