git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git]
/
fs
/
cifs
/
sess.c
diff --git
a/fs/cifs/sess.c
b/fs/cifs/sess.c
index
4ec3ee9
..
d362626
100644
(file)
--- a/
fs/cifs/sess.c
+++ b/
fs/cifs/sess.c
@@
-198,7
+198,7
@@
static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
bytes_ret = 0;
} else
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName,
bytes_ret = 0;
} else
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName,
-
256
, nls_cp);
+
CIFS_MAX_DOMAINNAME_LEN
, nls_cp);
bcc_ptr += 2 * bytes_ret;
bcc_ptr += 2; /* account for null terminator */
bcc_ptr += 2 * bytes_ret;
bcc_ptr += 2; /* account for null terminator */
@@
-246,19
+246,18
@@
static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
/* copy user */
/* BB what about null user mounts - check that we do this BB */
/* copy user */
/* copy user */
/* BB what about null user mounts - check that we do this BB */
/* copy user */
- if (ses->user_name != NULL)
+ if (ses->user_name != NULL)
{
strncpy(bcc_ptr, ses->user_name, MAX_USERNAME_SIZE);
strncpy(bcc_ptr, ses->user_name, MAX_USERNAME_SIZE);
+ bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE);
+ }
/* else null user mount */
/* else null user mount */
-
- bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE);
*bcc_ptr = 0;
bcc_ptr++; /* account for null termination */
/* copy domain */
*bcc_ptr = 0;
bcc_ptr++; /* account for null termination */
/* copy domain */
-
if (ses->domainName != NULL) {
if (ses->domainName != NULL) {
- strncpy(bcc_ptr, ses->domainName,
256
);
- bcc_ptr += strnlen(ses->domainName,
256
);
+ strncpy(bcc_ptr, ses->domainName,
CIFS_MAX_DOMAINNAME_LEN
);
+ bcc_ptr += strnlen(ses->domainName,
CIFS_MAX_DOMAINNAME_LEN
);
} /* else we will send a null domain name
so the server will default to its own domain */
*bcc_ptr = 0;
} /* else we will send a null domain name
so the server will default to its own domain */
*bcc_ptr = 0;