diff options
| -rw-r--r-- | fs/cifs/CHANGES | 3 | ||||
| -rw-r--r-- | fs/cifs/sess.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 73ac7ebd1dfc..1cfa72ef1f37 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
| @@ -7,7 +7,8 @@ specified and user does not have access to query information about the | |||
| 7 | top of the share. Fix problem in 2.6.28 resolving DFS paths to | 7 | top of the share. Fix problem in 2.6.28 resolving DFS paths to |
| 8 | Samba servers (worked to Windows). Fix rmdir so that pending search | 8 | Samba servers (worked to Windows). Fix rmdir so that pending search |
| 9 | (readdir) requests do not get invalid results which include the now | 9 | (readdir) requests do not get invalid results which include the now |
| 10 | removed directory. | 10 | removed directory. Fix oops in cifs_dfs_ref.c when prefixpath is not reachable |
| 11 | when using DFS. | ||
| 11 | 12 | ||
| 12 | Version 1.55 | 13 | Version 1.55 |
| 13 | ------------ | 14 | ------------ |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 5f22de7b79a9..b234407a3007 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
| @@ -228,7 +228,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
| 228 | 228 | ||
| 229 | kfree(ses->serverOS); | 229 | kfree(ses->serverOS); |
| 230 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ | 230 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ |
| 231 | ses->serverOS = kzalloc(4 * len, GFP_KERNEL); | 231 | ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); |
| 232 | if (ses->serverOS != NULL) | 232 | if (ses->serverOS != NULL) |
| 233 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); | 233 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); |
| 234 | data += 2 * (len + 1); | 234 | data += 2 * (len + 1); |
| @@ -241,7 +241,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
| 241 | return rc; | 241 | return rc; |
| 242 | 242 | ||
| 243 | kfree(ses->serverNOS); | 243 | kfree(ses->serverNOS); |
| 244 | ses->serverNOS = kzalloc(4 * len, GFP_KERNEL); /* BB this is wrong length FIXME BB */ | 244 | ses->serverNOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); |
| 245 | if (ses->serverNOS != NULL) { | 245 | if (ses->serverNOS != NULL) { |
| 246 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, | 246 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, |
| 247 | nls_cp); | 247 | nls_cp); |
