diff options
author | Luke Leighton <lkcl@samba.org> | 1999-03-24 21:23:39 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-03-24 21:23:39 +0000 |
commit | 1ad002b7497c840f84b17e2a5187079d1140f90b (patch) | |
tree | a304afea713cc2bcfb4c74846247b0519183b881 /source3/libsmb | |
parent | d4de2b0ae342170a583126d9edf7adda97538d65 (diff) | |
download | samba-1ad002b7497c840f84b17e2a5187079d1140f90b.tar.gz samba-1ad002b7497c840f84b17e2a5187079d1140f90b.tar.bz2 samba-1ad002b7497c840f84b17e2a5187079d1140f90b.zip |
NULL pointer handling in nt_lm_owf_gen
(This used to be commit 68841eeb64df5958a90a6471fd17e6e56fba7c67)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smbencrypt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index 20a8eb0504..24945bc142 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -111,7 +111,10 @@ void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]) char passwd[130]; memset(passwd,'\0',130); - safe_strcpy( passwd, pwd, sizeof(passwd)-1); + if (pwd != NULL) + { + safe_strcpy( passwd, pwd, sizeof(passwd)-1); + } /* Calculate the MD4 hash (NT compatible) of the password */ memset(nt_p16, '\0', 16); |