diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-11-10 17:43:36 -0800 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-11-15 22:38:21 -0800 |
commit | 92423a466e2ec4646624204eafc930297197664c (patch) | |
tree | 1242947bbadd15f76caf9f2422fc10b6679b56c0 /sesman/chansrv/chansrv_fuse.c | |
parent | e8185caf319db95554f7f3a239e962ca96e24fd4 (diff) | |
download | xrdp-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.c | 2 |
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) { |