diff options
author | Werner Koch <[email protected]> | 1998-08-11 17:29:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-08-11 17:29:34 +0000 |
commit | 3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 (patch) | |
tree | dfff62df60f917addc9df4e83a1ed73e31041bab /g10/compress.c | |
parent | rel 0.3.3 (diff) | |
download | gnupg-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.tar.gz gnupg-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.zip |
bug fix releaseV0-3-4
Diffstat (limited to 'g10/compress.c')
-rw-r--r-- | g10/compress.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/g10/compress.c b/g10/compress.c index ca5adaebd..917a96033 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -151,19 +151,23 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, if( DBG_FILTER ) log_debug("call inflate: avail_in=%u, avail_out=%u\n", (unsigned)zs->avail_in, (unsigned)zs->avail_out); + #ifdef Z_SYNC_FLUSH + zrc = inflate( zs, Z_SYNC_FLUSH ); + #else zrc = inflate( zs, Z_PARTIAL_FLUSH ); + #endif if( DBG_FILTER ) log_debug("inflate returned: avail_in=%u, avail_out=%u, zrc=%d\n", (unsigned)zs->avail_in, (unsigned)zs->avail_out, zrc); if( zrc == Z_STREAM_END ) rc = -1; /* eof */ - else if( zrc != Z_OK ) { + else if( zrc != Z_OK && zrc != Z_BUF_ERROR ) { if( zs->msg ) log_fatal("zlib inflate problem: %s\n", zs->msg ); else log_fatal("zlib inflate problem: rc=%d\n", zrc ); } - } while( zs->avail_out && zrc != Z_STREAM_END ); + } while( zs->avail_out && zrc != Z_STREAM_END && zrc != Z_BUF_ERROR ); *ret_len = zfx->outbufsize - zs->avail_out; if( DBG_FILTER ) log_debug("do_uncompress: returning %u bytes\n", (unsigned)*ret_len ); |