Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4327859 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 308f8813 1fc29bac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}