blob: 46be723351df01314435a1f697812d4408f1317d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From e4f891a2bf923ce1a6b0867670db1dfc8e552981 Mon Sep 17 00:00:00 2001
From: Victor Denisov <vdenisov@mirantis.com>
Date: Mon, 18 Jan 2016 23:00:58 -0800
Subject: [PATCH] Handle searched checksum is bigger than any existing
Fix for issue #50
---
src/search.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/search.c b/src/search.c
index 75433b4..fce3831 100644
--- a/src/search.c
+++ b/src/search.c
@@ -218,7 +218,7 @@ rs_search_for_block(rs_weak_sum_t weak_sum,
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)
--
2.13.0
|