Reviewers: Yang OOO until mid October, jochen (ooo),
Message:
On 2014/07/28 09:06:49, jochen (ooo) wrote:
On 2014/07/26 at 01:43:22, jianghua.yjh wrote:
> please review .
I couldn't find a CCLA entry for you
(https://developers.google.com/open-source/cla/corporate?csw=1) Without
it, we
can't accept patches, sorry.
please recheck, we have signed CCLA.
Description:
Fix a potential overflow in BinarySearch, same as Issue 344513004
BUG=
Please review this at https://codereview.chromium.org/417353002/
Base URL: https://github.com/v8/v8.git@master
Affected files (+1, -1 lines):
M src/objects-inl.h
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index
83c81690e1ce4191305c150a80696c41b49c80af..6191fe0daa14543f203e6eb5f71331d1393ff63e
100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2765,7 +2765,7 @@ int BinarySearch(T* array, Name* name, int low, int
high, int valid_entries) {
ASSERT(low <= high);
while (low != high) {
- int mid = (low + high) / 2;
+ int mid = low + (high - low) / 2;
Name* mid_name = array->GetSortedKey(mid);
uint32_t mid_hash = mid_name->Hash();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.