diff options
author | Werner Koch <[email protected]> | 1997-11-24 11:04:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1997-11-24 11:04:11 +0000 |
commit | a51cca90b6c8d3628d9b97a08f9370b3e249a9b6 (patch) | |
tree | 093b652e684cef1623777be8ea2b96876f9ee1e7 /g10/compress.c | |
parent | compress stuff implemented (diff) | |
download | gnupg-a51cca90b6c8d3628d9b97a08f9370b3e249a9b6.tar.gz gnupg-a51cca90b6c8d3628d9b97a08f9370b3e249a9b6.zip |
IDEA removed, signing works
Diffstat (limited to 'g10/compress.c')
-rw-r--r-- | g10/compress.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/g10/compress.c b/g10/compress.c index a4fc48f88..980f5f976 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -124,6 +124,7 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, IOBUF a, size_t *ret_len ) { int zrc; + int rc=0; size_t n; byte *p; int c; @@ -147,7 +148,9 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, 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_OK && zrc != Z_STREAM_END ) { + if( zrc == Z_STREAM_END ) + rc = -1; /* eof */ + else if( zrc != Z_OK ) { if( zs->msg ) log_fatal("zlib inflate problem: %s\n", zs->msg ); else @@ -157,7 +160,7 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, *ret_len = zfx->outbufsize - zs->avail_out; if( DBG_FILTER ) log_debug("do_uncompress: returning %u bytes\n", (unsigned)*ret_len ); - return 0; + return rc; } |