summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorWilco Baan Hofman <wilco@baanhofman.nl>2009-10-10 21:42:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-11-15 19:26:50 +0100
commit5a7d48f82b06738924d6afedd53d79b0202d150a (patch)
tree47c9cd890f7209cce164cdf355454d8acb261f7c /source4
parent45bb24e93914d2fc5253052d75ef7e43a1c2b26c (diff)
downloadsamba-5a7d48f82b06738924d6afedd53d79b0202d150a.tar.gz
samba-5a7d48f82b06738924d6afedd53d79b0202d150a.tar.bz2
samba-5a7d48f82b06738924d6afedd53d79b0202d150a.zip
Fix writing corrupt REG_SZ to the registry.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 038b23fc87..88b9d18afa 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -124,8 +124,9 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
case REG_SZ:
case REG_EXPAND_SZ:
convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16,
- data_str, strlen(data_str),
+ data_str, strlen(data_str)+1,
(void **)&data->data, &data->length, false);
+
break;
case REG_DWORD: {