[Pkg-owncloud-commits] [owncloud-client] 283/498: vio_local: Give strncpy and strncat enough space to copy closing zero.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit ccc91a52a83c351f3b3be99c9b1e5ad4bab9e454
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Jul 7 21:31:15 2015 +0200
vio_local: Give strncpy and strncat enough space to copy closing zero.
---
csync/src/vio/csync_vio_local.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/csync/src/vio/csync_vio_local.c b/csync/src/vio/csync_vio_local.c
index 39f2c00..ee3c405 100644
--- a/csync/src/vio/csync_vio_local.c
+++ b/csync/src/vio/csync_vio_local.c
@@ -68,8 +68,8 @@ csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
// alloc an enough large buffer to take the name + '/*' + the closing zero.
h = c_malloc(len_name+3);
- strncpy( h, name, len_name);
- strncat(h, "/*",2);
+ strncpy( h, name, 1+len_name);
+ strncat(h, "/*",3);
dirname = c_utf8_path_to_locale(h);
SAFE_FREE(h);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list