diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-10-24 21:22:09 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-10-24 21:22:09 +0400 |
commit | a0e0fc5c0ce930df0cedff1eb3a5666286dfda72 (patch) | |
tree | bce41c141822decd7c408c30ba5cb8c51e2318e5 /support | |
parent | 390bd8554a6f0ce7e6a70fae49af67bbb67420d4 (diff) |
2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
* zlib-helper.c: stop trying to decompress when we get Z_STREAM_END.
Patch by Ives Bastide. Fixes bug #549942.
svn path=/trunk/mono/; revision=144799
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 5 | ||||
-rw-r--r-- | support/zlib-helper.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 4c8755d4fc7..0e8d2246c3d 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,8 @@ +2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * zlib-helper.c: stop trying to decompress when we get Z_STREAM_END. + Patch by Ives Bastide. Fixes bug #549942. + 2009-09-21 Leszek Ciesielski <skolima@gmail.com> * serial.c: return -1 from close() on error diff --git a/support/zlib-helper.c b/support/zlib-helper.c index 98fd6879e6b..5e11cb341eb 100644 --- a/support/zlib-helper.c +++ b/support/zlib-helper.c @@ -174,8 +174,12 @@ ReadZStream (ZStream *stream, guchar *buffer, gint length) } status = inflate (stream->stream, Z_SYNC_FLUSH); - if (status != Z_OK && status != Z_STREAM_END) + if (status == Z_STREAM_END) { + stream->eof = TRUE; + break; + } else if (status != Z_OK) { return status; + } } return length - zs->avail_out; } |