| Index: third_party/WebKit/Source/platform/wtf/text/TextCodecUTF8.cpp
|
| diff --git a/third_party/WebKit/Source/platform/wtf/text/TextCodecUTF8.cpp b/third_party/WebKit/Source/platform/wtf/text/TextCodecUTF8.cpp
|
| index 55f0ce5834fd0ca8f9173d15ab70121b3538c997..315f451bd9a97e769fd67696af0b7d7df95d9e07 100644
|
| --- a/third_party/WebKit/Source/platform/wtf/text/TextCodecUTF8.cpp
|
| +++ b/third_party/WebKit/Source/platform/wtf/text/TextCodecUTF8.cpp
|
| @@ -463,8 +463,7 @@ CString TextCodecUTF8::EncodeCommon(const CharType* characters, size_t length) {
|
| // (3x).
|
| // Non-BMP characters take two UTF-16 code units and can take up to 4 bytes
|
| // (2x).
|
| - if (length > std::numeric_limits<size_t>::max() / 3)
|
| - IMMEDIATE_CRASH();
|
| + CHECK_LE(length, std::numeric_limits<size_t>::max() / 3);
|
| Vector<uint8_t> bytes(length * 3);
|
|
|
| size_t i = 0;
|
|
|