From 713ee9242a52dd5343decb19788cea4c7f607f15 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Jun 2007 01:13:43 +0000 Subject: r23372: Remove restriction on string length for rpcclient commands. Jeremy. (This used to be commit a2cf87f58a0a1dbc468a78347880a2f07443b1d8) --- source3/rpcclient/rpcclient.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index ede6120345..87dac8f037 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -108,9 +108,9 @@ static char **completion_fn(const char *text, int start, int end) return matches; } -static char* next_command (char** cmdstr) +static char *next_command (char **cmdstr) { - static pstring command; + char *command; char *p; if (!cmdstr || !(*cmdstr)) @@ -119,7 +119,7 @@ static char* next_command (char** cmdstr) p = strchr_m(*cmdstr, ';'); if (p) *p = '\0'; - pstrcpy(command, *cmdstr); + command = SMB_STRDUP(*cmdstr); if (p) *cmdstr = p + 1; else @@ -868,6 +868,7 @@ out_free: while((cmd=next_command(&p)) != NULL) { NTSTATUS cmd_result = process_cmd(cli, cmd); + SAFE_FREE(cmd); result = NT_STATUS_IS_ERR(cmd_result); } -- cgit