summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-09-07 18:52:29 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-07 19:18:48 +0200
commit6e0335f8648f5ca2869ad1dd16c1e2aec20bd282 (patch)
treed8e09ca0971b08133f41554a1a4056cf3cf1b171 /source4/librpc/ndr
parent1825077840085e77b8190a3b6caaf127736ee183 (diff)
downloadsamba-6e0335f8648f5ca2869ad1dd16c1e2aec20bd282.tar.gz
samba-6e0335f8648f5ca2869ad1dd16c1e2aec20bd282.tar.bz2
samba-6e0335f8648f5ca2869ad1dd16c1e2aec20bd282.zip
ndr_compression: fix the build after lzxpress_decompress() prototype change
metze (This used to be commit b36056aac3f55587d2b3e7b66feea8173dbc67f0)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr_compression.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_compression.c b/source4/librpc/ndr/ndr_compression.c
index 5939c3838a..aa9f907eed 100644
--- a/source4/librpc/ndr/ndr_compression.c
+++ b/source4/librpc/ndr/ndr_compression.c
@@ -276,6 +276,7 @@ static enum ndr_err_code ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrp
uint32_t plain_chunk_offset;
uint32_t comp_chunk_size;
uint32_t plain_chunk_size;
+ ssize_t ret;
NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size));
if (plain_chunk_size > 0x00010000) {
@@ -299,7 +300,16 @@ static enum ndr_err_code ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrp
plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size));
/* Uncompressing the buffer using LZ Xpress algorithm */
- lzxpress_decompress(&comp_chunk, &plain_chunk);
+ ret = lzxpress_decompress(comp_chunk.data,
+ comp_chunk.length,
+ plain_chunk.data,
+ plain_chunk.length);
+ if (ret < 0) {
+ return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
+ "XPRESS lzxpress_decompress() returned %d\n",
+ ret);
+ }
+ plain_chunk.length = ret;
if ((plain_chunk_size < 0x00010000) || (ndrpull->offset+4 >= ndrpull->data_size)) {
/* this is the last chunk */