Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143701
b: refs/heads/master
c: 313fecf
h: refs/heads/master
i:
  143699: c50ece9
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Apr 17, 2009
1 parent 54fec61 commit e6b01fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f083def68f84b04fe3f97312498911afce79609e
refs/heads/master: 313fecfa69bbad0a10d3313a50a89d3064f47ce1
5 changes: 4 additions & 1 deletion trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -3757,11 +3757,14 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
kfree(tcon->nativeFileSystem);
tcon->nativeFileSystem =
kzalloc((4 * length) + 2, GFP_KERNEL);
if (tcon->nativeFileSystem)
if (tcon->nativeFileSystem) {
cifs_strfromUCS_le(
tcon->nativeFileSystem,
(__le16 *) bcc_ptr,
length, nls_codepage);
cFYI(1, ("nativeFileSystem=%s",
tcon->nativeFileSystem));
}
bcc_ptr += (2 * length) + 2;
}
/* else do not bother copying these information fields*/
Expand Down
9 changes: 7 additions & 2 deletions trunk/fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,10 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
kfree(ses->serverOS);
/* UTF-8 string will not grow more than four times as big as UCS-16 */
ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);
if (ses->serverOS != NULL)
if (ses->serverOS != NULL) {
cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
cFYI(1, ("serverOS=%s", ses->serverOS));
}
data += 2 * (len + 1);
words_left -= len + 1;

Expand All @@ -327,6 +329,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
if (ses->serverNOS != NULL) {
cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
nls_cp);
cFYI(1, ("serverNOS=%s", ses->serverNOS));
if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) {
cFYI(1, ("NT4 server"));
ses->flags |= CIFS_SES_NT4;
Expand All @@ -343,9 +346,11 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,

kfree(ses->serverDomain);
ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL);
if (ses->serverDomain != NULL)
if (ses->serverDomain != NULL) {
cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len,
nls_cp);
cFYI(1, ("serverDomain=%s", ses->serverDomain));
}
data += 2 * (len + 1);
words_left -= len + 1;

Expand Down

0 comments on commit e6b01fe

Please sign in to comment.