summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_objects.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 21ebba6540..b4b8ff2630 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -602,11 +602,12 @@ uint32 regval_dword(struct regval_blob *val)
return the data_p as a character string
**********************************************************************/
-char *regval_sz(struct regval_blob *val)
+const char *regval_sz(struct regval_blob *val)
{
- char *data = NULL;
+ const char *data = NULL;
+ DATA_BLOB blob = data_blob_const(regval_data_p(val), regval_size(val));
+
+ pull_reg_sz(talloc_tos(), &blob, &data);
- rpcstr_pull_talloc(talloc_tos(), &data,
- regval_data_p(val), regval_size(val),0);
return data;
}