From a65cb76f1c7b89e19aaf336081a6eac43f866304 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 11 Aug 2006 16:52:09 +0000 Subject: [PATCH] --- yaml --- r: 33677 b: refs/heads/master c: 66abda5e1fa48e12e06d0b68746b0e67202a97d2 h: refs/heads/master i: 33675: 7abbdca7f0c56766ccff0797442b07f831367980 v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifsencrypt.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 90c5ac06702e..05635bea9671 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ee1af765dfa3146aef958258003245e082284e5 +refs/heads/master: 66abda5e1fa48e12e06d0b68746b0e67202a97d2 diff --git a/trunk/fs/cifs/cifsencrypt.c b/trunk/fs/cifs/cifsencrypt.c index a89efaf78a26..4bc250b2d9fc 100644 --- a/trunk/fs/cifs/cifsencrypt.c +++ b/trunk/fs/cifs/cifsencrypt.c @@ -277,7 +277,8 @@ void calc_lanman_hash(struct cifsSesInfo * ses, char * lnm_session_key) return; memset(password_with_pad, 0, CIFS_ENCPWD_SIZE); - strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE); + if(ses->password) + strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE); if((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0) if(extended_security & CIFSSEC_MAY_PLNTXT) {