diff options
author | Jeremy Allison <jra@samba.org> | 1998-10-01 01:27:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-10-01 01:27:47 +0000 |
commit | c42fb702b70f18dfe3b97ce7ea24c4ce4b3f890f (patch) | |
tree | 82ab463a8cc3bdb08d80e911a9ee67e8c6a32720 | |
parent | 351b9a0f8b6c071f395e082d5e1c98bda706106c (diff) | |
download | samba-c42fb702b70f18dfe3b97ce7ea24c4ce4b3f890f.tar.gz samba-c42fb702b70f18dfe3b97ce7ea24c4ce4b3f890f.tar.xz samba-c42fb702b70f18dfe3b97ce7ea24c4ce4b3f890f.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.
-rw-r--r-- | source/libsmb/smbencrypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 5a946e22c9d..89c6eba810d 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/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); |