From: Gerald Carter Date: Wed, 27 Jun 2007 16:52:36 +0000 (+0000) Subject: r23633: Fix a couple of crash bugs pointed out by Volker caused by an old X-Git-Tag: samba-4.0.0alpha6~801^2~5523 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=255b807802f627451835c1525dd7dfee869833ee;p=thirdparty%2Fsamba.git 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) --- diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c index f0bce7e9312..1fa61c27ca1 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 */