summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-06-27 16:52:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:39 -0500
commit255b807802f627451835c1525dd7dfee869833ee (patch)
treeecc4b9e04a20ceca562d95f7035d1a2c29611be9 /source3/rpc_server
parente10258ff054c4b016d89ca4f4468f8f4461f5aca (diff)
downloadsamba-255b807802f627451835c1525dd7dfee869833ee.tar.gz
samba-255b807802f627451835c1525dd7dfee869833ee.tar.bz2
samba-255b807802f627451835c1525dd7dfee869833ee.zip
r23633: Fix a couple of crash bugs pointed out by Volker caused by an old
change from a pstring to a char* and still trying use pstrcpy(). (This used to be commit 21dc46a2bad6fee720f0f591e1051aa7675c77c8)
Diffstat (limited to 'source3/rpc_server')
-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 */