[Pkg-owncloud-commits] [owncloud-client] 69/164: csync_exclude: Ignore files where the filename length is > 254 chars.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Mar 22 11:56:54 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 4f7c062f3f967464616b811f2e2017d792a760e8
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Feb 26 17:09:49 2015 +0100

    csync_exclude: Ignore files where the filename length is > 254 chars.
    
    This is for example HFS+ and others. It fixes #2882
---
 csync/src/csync_exclude.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c
index 1d81bbf..583aebe 100644
--- a/csync/src/csync_exclude.c
+++ b/csync/src/csync_exclude.c
@@ -224,7 +224,8 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
   }
 
   rc = csync_fnmatch(".csync_journal.db*", bname, 0);
-  if (rc == 0) {
+  // check the strlen and ignore the file silently if its name is longer than 254 chars.
+  if (strlen(bname) > 254 || rc == 0) {
       match = CSYNC_FILE_SILENTLY_EXCLUDED;
       SAFE_FREE(bname);
       SAFE_FREE(dname);

-- 
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