From: Venky Shankar Date: Wed, 10 Mar 2021 13:37:47 +0000 (-0500) Subject: cephfs-mirror: null terminate buffer before synchronizing symbolc link X-Git-Tag: v17.1.0~2638^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=30f2066cfdb359c06167068253de0627b15aff91;p=ceph.git cephfs-mirror: null terminate buffer before synchronizing symbolc link Signed-off-by: Venky Shankar --- diff --git a/src/tools/cephfs_mirror/PeerReplayer.cc b/src/tools/cephfs_mirror/PeerReplayer.cc index 89368f3b86aa..86e1dc5f9856 100644 --- a/src/tools/cephfs_mirror/PeerReplayer.cc +++ b/src/tools/cephfs_mirror/PeerReplayer.cc @@ -681,6 +681,7 @@ int PeerReplayer::remote_file_op(const std::string &dir_path, return r; } + target[stx.stx_size] = '\0'; r = ceph_symlink(m_remote_mount, target, remote_path.c_str()); if (r < 0 && r != EEXIST) { derr << ": failed to symlink remote path=" << remote_path << " to target=" << target