pkgsrc/devel/librsync/patches/patch-ab
snj 10b5f45d07 As noted by Andreas Wrede in PR pkg/35677, librsync will stall on
transfers of files over 4 Gb, especially between 32 <-> 64 bit hosts.

Apply a fix from upstream CVS (slightly different in form from one of
the patches submitted in this PR).

Bump PKGREVISION.
2007-02-20 19:15:03 +00:00

18 lines
646 B
Text

$NetBSD: patch-ab,v 1.1 2007/02/20 19:15:03 snj Exp $
--- patch.c.orig 2007-02-20 10:59:09.000000000 -0800
+++ patch.c 2007-02-20 11:00:35.000000000 -0800
@@ -214,12 +214,9 @@ static rs_result rs_patch_s_copying(rs_j
void *buf, *ptr;
rs_buffers_t *buffs = job->stream;
- len = job->basis_len;
-
/* copy only as much as will fit in the output buffer, so that we
* don't have to block or store the input. */
- if (len > buffs->avail_out)
- len = buffs->avail_out;
+ len = (buffs->avail_out < job->basis_len) ? buffs->avail_out : job->basis_len;
if (!len)
return RS_BLOCKED;