summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscudette@gmail.com <scudette@gmail.com>2009-01-02 22:39:58 +1100
committerVolker Lendecke <vl@samba.org>2009-01-02 20:55:20 +0100
commitde58ef45ac0510bfa510fed54010f1de67e83953 (patch)
tree8630fa22a21ad89ce02d88e830b6a336d82fc71c
parent11576353f645d7d7f44a74d27545b946c6175658 (diff)
downloadsamba-de58ef45ac0510bfa510fed54010f1de67e83953.tar.gz
samba-de58ef45ac0510bfa510fed54010f1de67e83953.tar.bz2
samba-de58ef45ac0510bfa510fed54010f1de67e83953.zip
Fixes uninitialised access as reported by valgrind.
-rw-r--r--source4/lib/registry/regf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index a869ed4440..d6fb413b51 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -543,7 +543,7 @@ static WERROR regf_get_value(TALLOC_CTX *ctx, struct hive_key *key,
if (vk->data_length & 0x80000000) {
vk->data_length &=~0x80000000;
- data->data = (uint8_t *)&vk->data_offset;
+ data->data = talloc_memdup(ctx, (uint8_t *)&vk->data_offset, vk->data_length);
data->length = vk->data_length;
} else {
*data = hbin_get(regf, vk->data_offset);