mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/swfdec: Fix inflate() error code check
Fixes infinite loop
Fixes endless.poc
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a453bbb68f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
afd57722e1
commit
4770eac663
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user