diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
commit | 20796bcf57a7f5e1921dc12e0568221f985fe4f2 (patch) | |
tree | 8f0540a602a9ea0031d656bc31c0b8bc1e91eb70 /source3/libgpo/gpext/registry.c | |
parent | 323be4a6907e4915bb76aa103bf5b868f0b459b1 (diff) | |
parent | 1a416ff13ca7786f2e8d24c66addf00883e9cb12 (diff) | |
download | samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.gz samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.bz2 samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.zip |
Merge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into docbook
Conflicts:
source/Makefile.in
(This used to be commit 01987778a123f853fccdcb7fe9566143e2d7c490)
Diffstat (limited to 'source3/libgpo/gpext/registry.c')
-rw-r--r-- | source3/libgpo/gpext/registry.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c index 6cad8c796c..188a48ab49 100644 --- a/source3/libgpo/gpext/registry.c +++ b/source3/libgpo/gpext/registry.c @@ -258,6 +258,7 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx, char *key = NULL; char *value = NULL; enum gp_reg_action action = GP_REG_ACTION_NONE; + size_t converted_size; ZERO_STRUCTP(*reg_entry); @@ -268,12 +269,16 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx, if (strlen_w((const smb_ucs2_t *)file_entry->key.buffer) <= 0) return false; - if (!pull_ucs2_talloc(mem_ctx, &key, file_entry->key.buffer)) + if (!pull_ucs2_talloc(mem_ctx, &key, file_entry->key.buffer, + &converted_size)) + { return false; + } - if (strlen_w((const smb_ucs2_t *)file_entry->value.buffer) > 0) { - if (!pull_ucs2_talloc(mem_ctx, &value, - file_entry->value.buffer)) + if (strlen_w((const smb_ucs2_t *)file_entry->value.buffer) > 0 && + !pull_ucs2_talloc(mem_ctx, &value, file_entry->value.buffer, + &converted_size)) + { return false; } @@ -294,9 +299,13 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx, case REG_NONE: break; case REG_SZ: - data->v.sz.len = pull_ucs2_talloc(mem_ctx, - &data->v.sz.str, - (const smb_ucs2_t *)file_entry->data); + if (!pull_ucs2_talloc(mem_ctx, &data->v.sz.str, + (const smb_ucs2_t *) + file_entry->data, + &data->v.sz.len)) { + data->v.sz.len = -1; + } + break; case REG_DWORD_BIG_ENDIAN: case REG_EXPAND_SZ: |