summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/ndr/ndr_compression.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source4/librpc/ndr/ndr_compression.c b/source4/librpc/ndr/ndr_compression.c
index 37f95bb1b6..0b33d40c24 100644
--- a/source4/librpc/ndr/ndr_compression.c
+++ b/source4/librpc/ndr/ndr_compression.c
@@ -104,13 +104,6 @@ static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpu
zError(z_ret), z_ret);
}
- } else {
- z_ret = inflateReset2(z, Z_RESET_KEEP_WINDOW);
- if (z_ret != Z_OK) {
- return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
- "Bad inflateReset2 error %s(%d) (PULL)",
- zError(z_ret), z_ret);
- }
}
/* call inflate untill we get Z_STREAM_END or an error */
@@ -142,6 +135,20 @@ static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpu
*last = true;
}
+ z_ret = inflateReset(z);
+ if (z_ret != Z_OK) {
+ return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
+ "Bad inflateReset error %s(%d) (PULL)",
+ zError(z_ret), z_ret);
+ }
+
+ z_ret = inflateSetDictionary(z, plain_chunk.data, plain_chunk.length);
+ if (z_ret != Z_OK) {
+ return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
+ "Bad inflateSetDictionary error %s(%d) (PULL)",
+ zError(z_ret), z_ret);
+ }
+
return NDR_ERR_SUCCESS;
}