summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-05 09:00:57 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-04 22:09:52 +0000
commit199399ef7451482ce6efbb15cbbc165e5d29a800 (patch)
treed9e12aebbbc42cb2c0399dea266a9d45155a2b19
parenta5d485112e464d52eef66d2084de2186d47668dc (diff)
downloadsamba-199399ef7451482ce6efbb15cbbc165e5d29a800.tar.gz
samba-199399ef7451482ce6efbb15cbbc165e5d29a800.tar.bz2
samba-199399ef7451482ce6efbb15cbbc165e5d29a800.zip
compression: fixed an uninitialised data but in lzxpress
-rw-r--r--lib/compression/lzxpress.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compression/lzxpress.c b/lib/compression/lzxpress.c
index 26b1bd5052..0396c9ddcb 100644
--- a/lib/compression/lzxpress.c
+++ b/lib/compression/lzxpress.c
@@ -80,6 +80,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
uncompressed_pos = 0;
indic = 0;
+ *(uint32_t *)compressed = 0;
compressed_pos = sizeof(uint32_t);
indic_pos = &compressed[0];
@@ -223,6 +224,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
for (; (indic_bit % 32) != 0; indic_bit++)
indic |= 0 << (32 - ((indic_bit % 32) + 1));
+ *(uint32_t *)&compressed[compressed_pos] = 0;
*(uint32_t *)indic_pos = indic;
compressed_pos += sizeof(uint32_t);
}