summaryrefslogtreecommitdiff
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 19:30:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 19:30:09 +0200
commit99097a214b0c15f7595ac8f2788662f3941c1992 (patch)
tree9e496a96ea36ccd9e97509878fadeecd671e28aa /fs/cifs/dir.c
parentd4e34999a7571e0a8d43cec6a0f13ecf40d3b1e8 (diff)
parent089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff)
Merge 5.3-rc7 into char-misc-next
We need the fixes in here as well for testing and merges Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index f26a48dd2e39..be424e81e3ad 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -69,11 +69,10 @@ cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
return full_path;
if (dfsplen)
- strncpy(full_path, tcon->treeName, dfsplen);
+ memcpy(full_path, tcon->treeName, dfsplen);
full_path[dfsplen] = CIFS_DIR_SEP(cifs_sb);
- strncpy(full_path + dfsplen + 1, vol->prepath, pplen);
+ memcpy(full_path + dfsplen + 1, vol->prepath, pplen);
convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb));
- full_path[dfsplen + pplen] = 0; /* add trailing null */
return full_path;
}