summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-11 09:35:05 +0100
committerVolker Lendecke <vl@samba.org>2009-02-11 09:35:15 +0100
commit0b6f21841e0e90cc269a93c3507a31a5431d44f4 (patch)
tree51855b10881a8c57be23b493c116802653153ce5 /source3/rpcclient
parentdf42719ca374f92980ead8885987f606181c4321 (diff)
downloadsamba-0b6f21841e0e90cc269a93c3507a31a5431d44f4.tar.gz
samba-0b6f21841e0e90cc269a93c3507a31a5431d44f4.tar.bz2
samba-0b6f21841e0e90cc269a93c3507a31a5431d44f4.zip
Only assign argv[1] after the argc check, thanks Tim!
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 93c2a1d3eb..c3fd463271 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2593,7 +2593,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
- const char *printername = argv[1];
+ const char *printername;
char *printername_path = NULL;
struct cli_state *cli_server2 = NULL;
struct rpc_pipe_client *cli2 = NULL;
@@ -2606,6 +2606,8 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
return WERR_OK;
}
+ printername = argv[1];
+
/* first get the connection to the remote server */
nt_status = cli_full_connection(&cli_server2, global_myname(), argv[2],