summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/clirap2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c
index 9cc8110576..a15fa5f7d8 100644
--- a/source3/libsmb/clirap2.c
+++ b/source3/libsmb/clirap2.c
@@ -1856,6 +1856,7 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char
+WORDSIZE]; /* buffer size? */
char upperbuf[MAX(RAP_USERNAME_LEN,RAP_MACHNAME_LEN)];
int res = -1;
+ char *tmp = NULL;
memset(param, 0, sizeof(param));
@@ -1866,11 +1867,13 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char
PUTDWORD(p, 0); /* Null pointer */
strlcpy(upperbuf, user, sizeof(upperbuf));
strupper_m(upperbuf);
- PUTSTRINGF(p, upperbuf, RAP_USERNAME_LEN);
+ tmp = upperbuf;
+ PUTSTRINGF(p, tmp, RAP_USERNAME_LEN);
p++; /* strange format, but ok */
strlcpy(upperbuf, workstation, sizeof(upperbuf));
strupper_m(upperbuf);
- PUTSTRINGF(p, upperbuf, RAP_MACHNAME_LEN);
+ tmp = upperbuf;
+ PUTSTRINGF(p, tmp, RAP_MACHNAME_LEN);
PUTWORD(p, CLI_BUFFER_SIZE);
PUTWORD(p, CLI_BUFFER_SIZE);