diff options
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index ca9469aede..b3d135275a 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -120,7 +120,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv) return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -239,7 +239,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv) return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -319,7 +319,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char ** return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -396,7 +396,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 0b45767afe..157abb27f5 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -158,7 +158,7 @@ static uint32 cmd_spoolss_open_printer_ex(struct cli_state *cli, int argc, char return NT_STATUS_UNSUCCESSFUL; - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); fstrcpy (user, cli->user_name); fstrcpy (printername, argv[1]); @@ -503,9 +503,9 @@ static uint32 cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **arg info_level = atoi(argv[2]); } - slprintf (servername, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (servername); - slprintf (printername, sizeof(fstring), "\\\\%s\\%s", servername, argv[1]); + slprintf (printername, sizeof(fstring)-1, "\\\\%s\\%s", servername, argv[1]); fstrcpy (username, cli->user_name); /* get a printer handle */ @@ -691,7 +691,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv } /* get the arguments need to open the printer handle */ - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); fstrcpy (user, cli->user_name); fstrcpy (printername, argv[1]); @@ -789,7 +789,7 @@ static uint32 cmd_spoolss_enum_drivers(struct cli_state *cli, int argc, char **a } /* get the arguments need to open the printer handle */ - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if (argc == 2) info_level = atoi(argv[1]); @@ -1091,7 +1091,7 @@ static uint32 cmd_spoolss_addprinterex (struct cli_state *cli, int argc, char ** return NT_STATUS_NOPROBLEMO; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); /* Initialise RPC connection */ |