| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 9100c114141cab10af5f74f4d8b3f98c9504cea5..7e93a230be336dcac91d334f053e9126cfc0af48 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -4126,14 +4126,14 @@ void ByteArray::set(int index, byte value) {
|
| }
|
|
|
| void ByteArray::copy_in(int index, const byte* buffer, int length) {
|
| - DCHECK(index >= 0 && length >= 0 && index + length >= index &&
|
| + DCHECK(index >= 0 && length >= 0 && length <= kMaxInt - index &&
|
| index + length <= this->length());
|
| byte* dst_addr = FIELD_ADDR(this, kHeaderSize + index * kCharSize);
|
| memcpy(dst_addr, buffer, length);
|
| }
|
|
|
| void ByteArray::copy_out(int index, byte* buffer, int length) {
|
| - DCHECK(index >= 0 && length >= 0 && index + length >= index &&
|
| + DCHECK(index >= 0 && length >= 0 && length <= kMaxInt - index &&
|
| index + length <= this->length());
|
| const byte* src_addr = FIELD_ADDR(this, kHeaderSize + index * kCharSize);
|
| memcpy(buffer, src_addr, length);
|
|
|