summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/clientgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6132114ac6..dc60b6951c 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -627,8 +627,9 @@ BOOL cli_session_setup(struct cli_state *cli,
SMBencrypt((uchar *)pass,(uchar *)cli->cryptkey,(uchar *)pword);
SMBNTencrypt((uchar *)ntpass,(uchar *)cli->cryptkey,(uchar *)ntpword);
} else {
- memcpy(pword, pass, passlen);
- memcpy(ntpword, ntpass, ntpasslen);
+ fstrcpy(pword, pass);
+ fstrcpy(ntpword, "");
+ ntpasslen = 0;
}
}