git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5d4851
)
compression: fixed an uninitialised data but in lzxpress
author
Andrew Tridgell
<tridge@samba.org>
Thu, 4 Nov 2010 22:00:57 +0000
(09:00 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 4 Nov 2010 22:09:52 +0000
(22:09 +0000)
lib/compression/lzxpress.c
patch
|
blob
|
history
diff --git
a/lib/compression/lzxpress.c
b/lib/compression/lzxpress.c
index 26b1bd5052df7e4a99a921f9979c9c54e8002961..0396c9ddcb2df3a3a250a464ef05ce43c64e9791 100644
(file)
--- 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);
}