Revision: 8820 Author: [email protected] Date: Wed Aug 3 06:56:55 2011 Log: Add missing bounds check in FixedArray::set for smis
[email protected] BUG=none TEST=none Review URL: http://codereview.chromium.org/7564010 http://code.google.com/p/v8/source/detail?r=8820 Modified: /branches/bleeding_edge/src/objects-inl.h ======================================= --- /branches/bleeding_edge/src/objects-inl.h Wed Aug 3 05:48:30 2011 +++ /branches/bleeding_edge/src/objects-inl.h Wed Aug 3 06:56:55 2011 @@ -1612,6 +1612,7 @@ void FixedArray::set(int index, Smi* value) { ASSERT(map() != HEAP->fixed_cow_array_map()); + ASSERT(index >= 0 && index < this->length()); ASSERT(reinterpret_cast<Object*>(value)->IsSmi()); int offset = kHeaderSize + index * kPointerSize; WRITE_FIELD(this, offset, value); -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
