Chromium Code Reviews| Index: WebCore/dom/Text.cpp |
| =================================================================== |
| --- WebCore/dom/Text.cpp (revision 69027) |
| +++ WebCore/dom/Text.cpp (working copy) |
| @@ -123,6 +123,8 @@ |
| continue; |
| const Text* t = static_cast<const Text*>(n); |
| const String& data = t->data(); |
| + if (std::numeric_limits<unsigned>::max() - data.length() < resultLength) |
| + CRASH(); |
| resultLength += data.length(); |
| } |
| UChar* resultData; |