summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_winreg_nt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index f0bce7e931..1fa61c27ca 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -661,7 +661,12 @@ static WERROR reg_load_tree( REGF_FILE *regfile, const char *topkeypath,
topkeypath ));
return WERR_BADFILE;
}
- pstrcpy( registry_key.name, topkeypath );
+
+ registry_key.name = talloc_strdup( regfile->mem_ctx, topkeypath );
+ if ( !registry_key.name ) {
+ DEBUG(0,("reg_load_tree: Talloc failed for reg_key.name!\n"));
+ return WERR_NOMEM;
+ }
/* now start parsing the values and subkeys */