summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-05-03 11:15:21 +0000
committereik <eik@FreeBSD.org>2004-05-03 11:15:21 +0000
commit285007bff96354465e436436f2908168f0e0be60 (patch)
tree5aab245dfc368f62c313eee938c73345d32e458d
parent889816033d13aed93515a2d4b7b56e8cdaa47a3b (diff)
downloadFreeBSD-ports-285007bff96354465e436436f2908168f0e0be60.zip
FreeBSD-ports-285007bff96354465e436436f2908168f0e0be60.tar.gz
fix --delete SEGV
<http://lists.samba.org/archive/rsync/2004-May/009380.html>
-rw-r--r--net/rsync/Makefile1
-rw-r--r--net/rsync/files/patch-flist.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/net/rsync/Makefile b/net/rsync/Makefile
index 52dbbec..ff57f5f 100644
--- a/net/rsync/Makefile
+++ b/net/rsync/Makefile
@@ -8,6 +8,7 @@
PORTNAME= rsync
PORTVERSION= 2.6.2
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://rsync.samba.org/ftp/%SUBDIR%/ \
ftp://rsync.samba.org/pub/%SUBDIR%/ \
diff --git a/net/rsync/files/patch-flist.c b/net/rsync/files/patch-flist.c
new file mode 100644
index 0000000..a3c92a7
--- /dev/null
+++ b/net/rsync/files/patch-flist.c
@@ -0,0 +1,24 @@
+#
+# fix --delete SEGV
+# <http://lists.samba.org/archive/rsync/2004-May/009380.html>
+#
+--- flist.c 29 Apr 2004 19:37:15 -0000 1.218
++++ flist.c 3 May 2004 01:24:10 -0000 1.220
+@@ -539,6 +539,7 @@ void receive_file_entry(struct file_stru
+ rdev_major = 0;
+ uid = 0, gid = 0;
+ *lastname = '\0';
++ lastdir_len = -1;
+ return;
+ }
+
+@@ -745,7 +746,7 @@ struct file_struct *make_file(char *fnam
+ char *basename, *dirname, *bp;
+ unsigned short flags = 0;
+
+- if (!flist) /* lastdir isn't valid if flist is NULL */
++ if (!flist || !flist->count) /* Ignore lastdir when invalid. */
+ lastdir_len = -1;
+
+ if (strlcpy(thisname, fname, sizeof thisname)
+
OpenPOWER on IntegriCloud