opt/librsync/librsync.patch

32 lines
1.0 KiB
Diff
Raw Normal View History

diff -Nru librsync-0.9.7/mdfour.h librsync-0.9.7-new/mdfour.h
--- librsync-0.9.7/mdfour.h 2004-02-08 00:17:57.000000000 +0100
+++ librsync-0.9.7-new/mdfour.h 2007-07-26 21:50:26.000000000 +0200
@@ -24,7 +24,7 @@
#include "types.h"
struct rs_mdfour {
- int A, B, C, D;
+ unsigned int A, B, C, D;
#if HAVE_UINT64
uint64_t totalN;
#else
diff -Nru librsync-0.9.7/patch.c librsync-0.9.7-new/patch.c
--- librsync-0.9.7/patch.c 2004-09-17 23:35:50.000000000 +0200
+++ librsync-0.9.7-new/patch.c 2007-07-26 21:50:06.000000000 +0200
@@ -214,12 +214,12 @@
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)
+ if (job->basis_len > buffs->avail_out)
len = buffs->avail_out;
+ else
+ len = job->basis_len;
if (!len)
return RS_BLOCKED;