mirror of
https://github.com/samba-team/samba.git
synced 2025-01-15 23:24:37 +03:00
Specify buffer sizes
This commit is contained in:
parent
2effcae13f
commit
aa12379b3f
@ -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 */
|
||||
@ -778,7 +778,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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user