diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-19 11:28:22 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-19 12:00:02 +0300 |
commit | a453bbb68f3eec202673728988bba3bc76071761 (patch) | |
tree | 0d5051dd68b7b24916c13b22ff2cbbf864242919 /libavformat/swfdec.c | |
parent | 2a3720bc22d92d236ce62112edf80103e33ece1b (diff) |
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>
Diffstat (limited to 'libavformat/swfdec.c')
-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 2d8e3b0e3e..20f1568e6f 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -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; |