From fcc06299831e42841a10795b67a613c1f5f8e68f Mon Sep 17 00:00:00 2001 From: Tijl Coosemans Date: Fri, 11 Mar 2016 13:33:35 +0000 Subject: - Update net/csync2 to version 2.0. - Prevent use of pdflatex when it's installed. - Replace patch-csync2-compare with USES=shebangfix. - Add a patch to fix use of strlcpy (pass size of destination instead of source). - Add a patch to let the compiler know csync_fatal does not return. This fixes a warning about an uninitialised variable. - Use predefined PKG_PREFIX in pkg-install and create directories from pkg-plist. PR: 207765 Approved by: alexey@renatasystems.org (maintainer) --- net/csync2/files/patch-rsync.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 net/csync2/files/patch-rsync.c (limited to 'net/csync2/files/patch-rsync.c') diff --git a/net/csync2/files/patch-rsync.c b/net/csync2/files/patch-rsync.c new file mode 100644 index 000000000000..c8f47627d5cb --- /dev/null +++ b/net/csync2/files/patch-rsync.c @@ -0,0 +1,30 @@ +--- rsync.c.orig 2015-03-09 14:08:51 UTC ++++ rsync.c +@@ -41,6 +41,7 @@ + + /* This has been taken from rsync:lib/compat.c */ + ++#if 0 + /** + * Like strncpy but does not 0 fill the buffer and always null + * terminates. +@@ -61,6 +62,7 @@ static size_t strlcpy(char *d, const cha + } + return ret; + } ++#endif + + /* splits filepath at the last '/', if any, like so: + * dirname basename filepath +@@ -117,7 +119,10 @@ int mkpath(const char *path, mode_t mode + return -1; + } + +- strlcpy(temp,path,strlen(path)); ++ if(strlcpy(temp,path,sizeof(temp))>=sizeof(temp)) { ++ csync_debug(1,"path too long: %s",path); ++ return -1; ++ } + csync_debug(1,"mkpath full path: %s",temp); + for( remaining=strchr(temp+1, '/'); remaining!=NULL; remaining=strchr(remaining+1, '/') ){ + *remaining='\0'; -- cgit v1.2.3