summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/regpatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tools/regpatch.c')
-rw-r--r--source4/lib/registry/tools/regpatch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index c2f01ce5b4..5f7d4376d4 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -704,9 +704,11 @@ static int nt_apply_reg_command_file(struct registry_context *r, const char *cmd
DEBUG(0, ("Error removing value '%s'\n", val->name));
}
modified = True;
- }
- else {
- if(!W_ERROR_IS_OK(reg_val_set(tmp, val->name, val->type, val->val, strlen(val->val)))) {
+ } else {
+ DATA_BLOB blob;
+ blob.data = (uint8_t *)val->val;
+ blob.length = strlen(val->val);
+ if(!W_ERROR_IS_OK(reg_val_set(tmp, val->name, val->type, blob))) {
DEBUG(0, ("Error adding new value '%s'\n", val->name));
continue;
}