diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 4 | ||||
-rw-r--r-- | source3/libsmb/clifile.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clilist.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 49b0004ac23..54a282e8057 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -66,7 +66,7 @@ static BOOL cli_session_setup_lanman2(struct cli_state *cli, const char *user, memcpy(pword, pass, passlen); } else if (passlen > 0) { /* Plaintext mode needed, assume plaintext supplied. */ - passlen = clistr_push(cli, pword, pass, -1, STR_TERMINATE); + passlen = clistr_push(cli, pword, pass, sizeof(pword), STR_TERMINATE); } /* send a session setup command */ @@ -774,7 +774,7 @@ BOOL cli_send_tconX(struct cli_state *cli, /* * Non-encrypted passwords - convert to DOS codepage before using. */ - passlen = clistr_push(cli, pword, pass, -1, STR_TERMINATE); + passlen = clistr_push(cli, pword, pass, sizeof(pword), STR_TERMINATE); } else { memcpy(pword, pass, passlen); } diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 8e84963c094..d86f36405dd 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -948,7 +948,7 @@ BOOL cli_chkpath(struct cli_state *cli, const char *path) pstring path2; char *p; - safe_strcpy(path2,path,sizeof(pstring)); + pstrcpy(path2,path); trim_string(path2,NULL,"\\"); if (!*path2) *path2 = '\\'; diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 3884e4da828..5bd1283ab7b 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -178,7 +178,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, SSVAL(param,6,info_level); SIVAL(param,8,0); p = param+12; - p += clistr_push(cli, param+12, mask, -1, + p += clistr_push(cli, param+12, mask, sizeof(param)-12, STR_TERMINATE); } else { setup = TRANSACT2_FINDNEXT; @@ -188,7 +188,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, SIVAL(param,6,0); /* ff_resume_key */ SSVAL(param,10,8+4+2); /* continue + resume required + close on end */ p = param+12; - p += clistr_push(cli, param+12, mask, -1, + p += clistr_push(cli, param+12, mask, sizeof(param)-12, STR_TERMINATE); } |