summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-10-01 01:27:47 +0000
committerJeremy Allison <jra@samba.org>1998-10-01 01:27:47 +0000
commit53033c081a07ac4e2f81b8cb4891a281281c6b67 (patch)
tree7b905603e4b5bc3a34c2b537fbc7f2815e0dd314 /source3
parent85fcbcb215ca83540735351b6b33fd8635119ecf (diff)
downloadsamba-53033c081a07ac4e2f81b8cb4891a281281c6b67.tar.gz
samba-53033c081a07ac4e2f81b8cb4891a281281c6b67.tar.bz2
samba-53033c081a07ac4e2f81b8cb4891a281281c6b67.zip
Fixed *nasty* bug in nt_lm_owf_gen() - this function was
not ensuring a zero filled buffer before doing crypto stuff. See PR#10121. Beware of this ! Jeremy. (This used to be commit c42fb702b70f18dfe3b97ce7ea24c4ce4b3f890f)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/smbencrypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index 5a946e22c9..89c6eba810 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -101,7 +101,9 @@ void E_md4hash(uchar *passwd, uchar *p16)
void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16])
{
char passwd[130];
- StrnCpy(passwd, pwd, sizeof(passwd)-1);
+
+ memset(passwd,'\0',130);
+ safe_strcpy( passwd, pwd, sizeof(passwd)-1);
/* Calculate the MD4 hash (NT compatible) of the password */
memset(nt_p16, '\0', 16);