diff options
author | Werner Koch <[email protected]> | 1999-01-19 18:37:41 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-01-19 18:37:41 +0000 |
commit | ce650acf1fc32a20db50a996ecc3008f47b02188 (patch) | |
tree | eeafe3ce39fcbdc17a377470914942920c6d225b /g10/compress.c | |
parent | See ChangeLog: Sun Jan 17 11:04:33 CET 1999 Werner Koch (diff) | |
download | gnupg-ce650acf1fc32a20db50a996ecc3008f47b02188.tar.gz gnupg-ce650acf1fc32a20db50a996ecc3008f47b02188.zip |
See ChangeLog: Tue Jan 19 19:34:58 CET 1999 Werner Koch
Diffstat (limited to 'g10/compress.c')
-rw-r--r-- | g10/compress.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/g10/compress.c b/g10/compress.c index 5aad678d6..accca02cc 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -146,8 +146,14 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, if( !n ) zs->next_in = zfx->inbuf; for( p=zfx->inbuf+n; n < zfx->inbufsize; n++, p++ ) { - if( (c=iobuf_get(a)) == -1 ) - break; + if( (c=iobuf_get(a)) == -1 ) { + /* If we use the undocumented feature to suppress + * the zlib header, we have to give inflate an + * extra dummy byte to read */ + if( zfx->algo != 1 || zfx->algo1hack ) + break; + zfx->algo1hack = 1; + } *p = c & 0xff; } zs->avail_in = n; |