diff options
-rw-r--r-- | fs/cifs/cifssmb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 4c344fe7a152..bc09c998631f 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2377,8 +2377,10 @@ winCreateHardLinkRetry: | |||
2377 | PATH_MAX, nls_codepage, remap); | 2377 | PATH_MAX, nls_codepage, remap); |
2378 | name_len++; /* trailing null */ | 2378 | name_len++; /* trailing null */ |
2379 | name_len *= 2; | 2379 | name_len *= 2; |
2380 | pSMB->OldFileName[name_len] = 0; /* pad */ | 2380 | |
2381 | pSMB->OldFileName[name_len + 1] = 0x04; | 2381 | /* protocol specifies ASCII buffer format (0x04) for unicode */ |
2382 | pSMB->OldFileName[name_len] = 0x04; | ||
2383 | pSMB->OldFileName[name_len + 1] = 0x00; /* pad */ | ||
2382 | name_len2 = | 2384 | name_len2 = |
2383 | cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], | 2385 | cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], |
2384 | toName, PATH_MAX, nls_codepage, remap); | 2386 | toName, PATH_MAX, nls_codepage, remap); |