diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 19:05:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 19:05:43 -0400 |
commit | e4327859341f2d3a93b4b6fef2ea483eac1c270c (patch) | |
tree | a4a31edd604f580e1513f919e1abbb2507bec6ab /fs | |
parent | 308f8813de2b608e8de436fa03a795d2e94f1a1f (diff) | |
parent | 1fc29bacedeabb278080e31bb9c1ecb49f143c3b (diff) |
Merge branch 'for-3.10' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fix from Steve French:
"Fix one byte buffer overrun with prefixpaths on cifs mounts which can
cause a problem with mount depending on the string length"
* 'for-3.10' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix off-by-one bug in build_unc_path_to_root
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 5b97e56ddbca..e3bc39bb9d12 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3279,8 +3279,8 @@ build_unc_path_to_root(const struct smb_vol *vol, | |||
3279 | pos = full_path + unc_len; | 3279 | pos = full_path + unc_len; |
3280 | 3280 | ||
3281 | if (pplen) { | 3281 | if (pplen) { |
3282 | *pos++ = CIFS_DIR_SEP(cifs_sb); | 3282 | *pos = CIFS_DIR_SEP(cifs_sb); |
3283 | strncpy(pos, vol->prepath, pplen); | 3283 | strncpy(pos + 1, vol->prepath, pplen); |
3284 | pos += pplen; | 3284 | pos += pplen; |
3285 | } | 3285 | } |
3286 | 3286 | ||