]> err.no Git - linux-2.6/blobdiff - fs/cifs/cifsencrypt.c
[PATCH] Take i_mutex in splice_from_pipe()
[linux-2.6] / fs / cifs / cifsencrypt.c
index a89efaf78a266ef2d7a4c01d8f5876c5969504dc..4bc250b2d9fc19aa27aea309b900b186b95a2602 100644 (file)
@@ -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) {