- Apply a patch from upstream for fix rs_search_for_block bug [1]

Fixes a sysutils/duplicity crash [2]

PR:		216569 [1]
PR:		216542 [2]
Obtained from:	c2daedb583
Submitted by:	Danilo G. Baio (dbaio) <dbaio@bsd.com.br>
This commit is contained in:
Bryan Drewery 2017-01-30 21:34:51 +00:00
parent 84fb6c53fe
commit 02840f8ff2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432873
2 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,7 @@
PORTNAME= librsync
PORTVERSION= 2.0.0
DISTVERSIONPREFIX=v
PORTREVISION= 1
CATEGORIES= net devel
PKGNAMESUFFIX= 2

View File

@ -0,0 +1,12 @@
# https://github.com/librsync/librsync/pull/59/files
--- src/search.c.orig 2015-11-29 20:43:12 UTC
+++ src/search.c
@@ -218,7 +218,7 @@ rs_search_for_block(rs_weak_sum_t weak_s
r = m;
}
- if (l == r) {
+ if ((l == r) && (l <= bucket->r)) {
int i = sig->targets[l].i;
rs_block_sig_t *b = &(sig->block_sigs[i]);
if (weak_sum != b->weak_sum)