{
struct cli_credentials *creds = samba_cmdline_get_creds();
size_t len;
+ const char *pwd = NULL;
len = strlcpy(domain, cli_credentials_get_domain(creds), domain_len);
if ((int)len >= domain_len) {
if ((int)len >= user_len) {
return;
}
- len = strlcpy(
- password, cli_credentials_get_password(creds), password_len);
+ pwd = cli_credentials_get_password(creds);
+ if (pwd == NULL) {
+ pwd = "";
+ }
+
+ len = strlcpy(password, pwd, password_len);
if ((int)len >= password_len) {
/* pointless, but what can you do... */
return;