diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-19 10:28:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | 46ecb01f62e5944b46f1df23be714dc3e920649a (patch) | |
tree | e8912bc6235aa594f985242d8818436b69855532 | |
parent | aa54f0926273a7142195e01ec01fa99f1c903613 (diff) | |
download | ffmpeg-46ecb01f62e5944b46f1df23be714dc3e920649a.tar.gz |
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 a453bbb68f3eec202673728988bba3bc76071761)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/swfdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index b2c652eb9c..db683ac59b 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -90,10 +90,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; |