diff options
author | Jeremy Allison <jra@samba.org> | 2007-06-07 01:13:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:11 -0500 |
commit | 713ee9242a52dd5343decb19788cea4c7f607f15 (patch) | |
tree | be796e3fc908a8dff9657db9ac7202dbb5b90552 | |
parent | 5b1126860920bda56eb5c10b9c9b3fc9cd821b94 (diff) | |
download | samba-713ee9242a52dd5343decb19788cea4c7f607f15.tar.gz samba-713ee9242a52dd5343decb19788cea4c7f607f15.tar.bz2 samba-713ee9242a52dd5343decb19788cea4c7f607f15.zip |
r23372: Remove restriction on string length for rpcclient commands.
Jeremy.
(This used to be commit a2cf87f58a0a1dbc468a78347880a2f07443b1d8)
-rw-r--r-- | source3/rpcclient/rpcclient.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |