summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:05:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:05:43 -0700
commite4327859341f2d3a93b4b6fef2ea483eac1c270c (patch)
treea4a31edd604f580e1513f919e1abbb2507bec6ab /fs
parent308f8813de2b608e8de436fa03a795d2e94f1a1f (diff)
parent1fc29bacedeabb278080e31bb9c1ecb49f143c3b (diff)
downloadlinux-next-e4327859341f2d3a93b4b6fef2ea483eac1c270c.tar.gz
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.c4
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,
pos = full_path + unc_len;
if (pplen) {
- *pos++ = CIFS_DIR_SEP(cifs_sb);
- strncpy(pos, vol->prepath, pplen);
+ *pos = CIFS_DIR_SEP(cifs_sb);
+ strncpy(pos + 1, vol->prepath, pplen);
pos += pplen;
}