[sheepdog] [PATCH] recovery: fix buffer overflow of rinfo->oids
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Feb 3 09:52:35 CET 2014
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/recovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index c15297c..50b6c58 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -613,8 +613,8 @@ main_fn bool oid_in_recovery(uint64_t oid)
*
* FIXME: do we need more efficient yet complex data structure?
*/
- if (xlfind(&oid, rinfo->oids + rinfo->done + 1, rinfo->count,
- oid_cmp))
+ if (xlfind(&oid, rinfo->oids + rinfo->done + 1,
+ rinfo->count - (rinfo->done + 1), oid_cmp))
break;
/*
--
1.7.10.4
More information about the sheepdog
mailing list