aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-03-10 09:59:33 +0000
committerWerner Koch <[email protected]>2003-03-10 09:59:33 +0000
commit230d87133609c3481749080d4370ecec4d3c22f0 (patch)
treefff11f9f1eedb64e6664b5cef7c024ac3004207b
parent* configure.ac: Define @CAPLIBS@ to link in -lcap if we are using (diff)
downloadgnupg-230d87133609c3481749080d4370ecec4d3c22f0.tar.gz
gnupg-230d87133609c3481749080d4370ecec4d3c22f0.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.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/compress.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 4b6ea0c8d..f27f87306 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-04 David Shaw <[email protected]>
* trustdb.c (validate_keys): Mask the ownertrust when building the
diff --git a/g10/compress.c b/g10/compress.c
index b11f148c3..8d9327cc3 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -125,8 +125,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" :