Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
StringTypeAdapter constructor is not properly enforcing String::MaxLe…
…ngth. https://bugs.webkit.org/show_bug.cgi?id=190392 <rdar://problem/45116210> Reviewed by Saam Barati. Previously, the StringTypeAdapter constructor for a UChar* string was summing the unsigned length of the source string without an overflow check. We now make that length a size_t which removes this issue, and assert that it's within String::MaxLength thereafter. Also made the StringTypeAdapter constructor for a LChar* string behave in an equivalent manner for consistency. In both cases, we'll crash in a RELEASE_ASSERT if the source string length exceeds String::MaxLength. * wtf/text/StringConcatenate.h: Canonical link: https://commits.webkit.org/205352@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information