summaryrefslogtreecommitdiff
path: root/net/rsync
diff options
context:
space:
mode:
authormycroft <mycroft@pkgsrc.org>2002-02-27 03:47:25 +0000
committermycroft <mycroft@pkgsrc.org>2002-02-27 03:47:25 +0000
commit78a1c3ea8cb8a36cbb2a855a933e1faa70984fa3 (patch)
treef3fa419a7185eb7568662cfcead52e493a0ae3cc /net/rsync
parent3de67974911d6de0432540c8420b2e1a071cad0b (diff)
downloadpkgsrc-78a1c3ea8cb8a36cbb2a855a933e1faa70984fa3.tar.gz
Fix an obscure LP64 (sizeof(off_t)==sizeof(size_t)) bug that causes incremental
transfers to go completely apeshit.
Diffstat (limited to 'net/rsync')
-rw-r--r--net/rsync/distinfo3
-rw-r--r--net/rsync/patches/patch-aa18
2 files changed, 20 insertions, 1 deletions
diff --git a/net/rsync/distinfo b/net/rsync/distinfo
index 74d320484c7..f5f7f5f21a3 100644
--- a/net/rsync/distinfo
+++ b/net/rsync/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.4 2002/01/26 19:04:49 bouyer Exp $
+$NetBSD: distinfo,v 1.5 2002/02/27 03:47:25 mycroft Exp $
SHA1 (rsync-2.5.2.tar.gz) = 53b1e43f77b17e214c8013315f3de8c08d2db0c5
Size (rsync-2.5.2.tar.gz) = 368916 bytes
+SHA1 (patch-aa) = 5619001ae653e6bc900a8b5791c8eb3e9aa5ad70
diff --git a/net/rsync/patches/patch-aa b/net/rsync/patches/patch-aa
new file mode 100644
index 00000000000..494dc9dfbd5
--- /dev/null
+++ b/net/rsync/patches/patch-aa
@@ -0,0 +1,18 @@
+$NetBSD: patch-aa,v 1.7 2002/02/27 03:47:56 mycroft Exp $
+
+--- match.c.orig Fri Jan 25 23:07:34 2002
++++ match.c Wed Feb 27 03:38:46 2002
+@@ -246,8 +246,11 @@
+ match. The 3 reads are caused by the
+ running match, the checksum update and the
+ literal send. */
+- if (offset-last_match >= CHUNK_SIZE+s->n &&
+- (end-offset > CHUNK_SIZE)) {
++ /* NOTE: If we just matched a block, then offset<last_match
++ (by 1). The arithmetic here must be ordered so that type
++ promotions (s->n is unsigned) do not cause a false match. */
++ if (offset >= last_match+CHUNK_SIZE+s->n &&
++ end > offset+CHUNK_SIZE) {
+ matched(f,s,buf,offset - s->n, -2);
+ }
+ } while (++offset < end);