summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/chansrv_fuse.c
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-11-10 17:43:36 -0800
committerPavel Roskin <plroskin@gmail.com>2016-11-15 22:38:21 -0800
commit92423a466e2ec4646624204eafc930297197664c (patch)
tree1242947bbadd15f76caf9f2422fc10b6679b56c0 /sesman/chansrv/chansrv_fuse.c
parente8185caf319db95554f7f3a239e962ca96e24fd4 (diff)
downloadxrdp-proprietary-92423a466e2ec4646624204eafc930297197664c.tar.gz
xrdp-proprietary-92423a466e2ec4646624204eafc930297197664c.zip
Fix potential buffer overflow in strncat() invocation
strncat() will copy at most the specified number of characters and append the null character on top of that. strlen() doesn't count the final null character.
Diffstat (limited to 'sesman/chansrv/chansrv_fuse.c')
-rw-r--r--sesman/chansrv/chansrv_fuse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c
index 6e0583bd..5891c955 100644
--- a/sesman/chansrv/chansrv_fuse.c
+++ b/sesman/chansrv/chansrv_fuse.c
@@ -2200,7 +2200,7 @@ static void xfuse_remove_dir_or_file(fuse_req_t req, fuse_ino_t parent,
}
strcat(full_path, "/");
- strncat(full_path, name, sizeof(full_path) - strlen(full_path));
+ strncat(full_path, name, sizeof(full_path) - strlen(full_path) - 1);
if (xinode->is_loc_resource)
{