From 83fe4b7703baf3ca7caf7ccbe824ae1d38d83f53 Mon Sep 17 00:00:00 2001 From: sears Date: Fri, 17 Dec 2010 21:15:26 +0000 Subject: [PATCH] fix array-out-of-bounds bug in unit test git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@1521 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- test/check_datapage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/check_datapage.cpp b/test/check_datapage.cpp index 1dbb935..23c9ff9 100644 --- a/test/check_datapage.cpp +++ b/test/check_datapage.cpp @@ -91,7 +91,7 @@ void insertWithConcurrentReads(size_t NUM_ENTRIES) { dsp.push_back(dp->get_start_pid()); } size_t j = (rand() % (2 * (1 + i - last_i))) + last_i; - + if(j >= key_arr.size()) { j = key_arr.size()-1; } bool found = 0; { DataPage::iterator it = dp->begin();