diff options
author | Werner Koch <[email protected]> | 2003-03-10 09:59:54 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2003-03-10 09:59:54 +0000 |
commit | a73a76b34e259f2135848b5a42ae3325dcd9a20b (patch) | |
tree | c768f19cd0b660dca4a07150428216a9418d8fd9 | |
parent | * compress.c (init_uncompress): Use a 15 bit window size so that (diff) | |
download | gnupg-a73a76b34e259f2135848b5a42ae3325dcd9a20b.tar.gz gnupg-a73a76b34e259f2135848b5a42ae3325dcd9a20b.zip |
* compress.c (init_uncompress): Use a 15 bit window size so that
the output of implementations which don't run for PGP 2
compatibility won't get garbled.
-rw-r--r-- | g10/ChangeLog | 6 | ||||
-rw-r--r-- | g10/compress.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index c0227385c..6464b60c6 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2003-03-10 Werner Koch <[email protected]> + + * compress.c (init_uncompress): Use a 15 bit window size so that + the output of implementations which don't run for PGP 2 + compatibility won't get garbled. + 2003-03-05 David Shaw <[email protected]> * passphrase.c (agent_get_passphrase): Fix memory leak with diff --git a/g10/compress.c b/g10/compress.c index 6ea84f6cd..8e535f064 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -116,8 +116,13 @@ init_uncompress( compress_filter_context_t *zfx, z_stream *zs ) * PGP uses a windowsize of 13 bits. Using a negative value for * it forces zlib not to expect a zlib header. This is a * undocumented feature Peter Gutmann told me about. + * + * We must use 15 bits for the inflator because CryptoEx uses 15 + * bits thus the output would get scrambled w/o error indication + * if we would use 13 bits. For the uncompressing this does not + * matter at all. */ - if( (rc = zfx->algo == 1? inflateInit2( zs, -13) + if( (rc = zfx->algo == 1? inflateInit2( zs, -15) : inflateInit( zs )) != Z_OK ) { log_fatal("zlib problem: %s\n", zs->msg? zs->msg : rc == Z_MEM_ERROR ? "out of core" : |