cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name
[linux-2.6-block.git] / fs / cifs / sess.c
index af0ec2d5ad0e9da25af4ec8528266451a42cc8b5..c3d086e2bd569bcdfbd565b68d5759a2817772e9 100644 (file)
@@ -430,7 +430,7 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
        } else {
                int len;
                len = cifs_strtoUTF16((__le16 *)tmp, ses->domainName,
-                                     CIFS_MAX_USERNAME_LEN, nls_cp);
+                                     CIFS_MAX_DOMAINNAME_LEN, nls_cp);
                len *= 2; /* unicode is 2 bytes each */
                sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - pbuffer);
                sec_blob->DomainName.Length = cpu_to_le16(len);