| Index: src/v8utils.h
|
| diff --git a/src/v8utils.h b/src/v8utils.h
|
| index 2064c5ac2c97d9d7759009bc79aade7493a3f746..3a9b776849652f23bca2f74545c901dd0819ac3a 100644
|
| --- a/src/v8utils.h
|
| +++ b/src/v8utils.h
|
| @@ -249,7 +249,8 @@ void CopyCharsUnsigned(sinkchar* dest, const sourcechar* src, int chars) {
|
| }
|
| // Number of characters in a uintptr_t.
|
| static const int kStepSize = sizeof(uintptr_t) / sizeof(*dest); // NOLINT
|
| - while (dest <= limit - kStepSize) {
|
| + ASSERT(dest + kStepSize > dest); // Check for overflow.
|
| + while (dest + kStepSize <= limit) {
|
| *reinterpret_cast<uintptr_t*>(dest) =
|
| *reinterpret_cast<const uintptr_t*>(src);
|
| dest += kStepSize;
|
|
|