<http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Nov 2010 16:36:04 +0000 (16:36 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Nov 2010 16:36:04 +0000 (16:36 +0000)
commit1076f8df26fa16cab5d71fe4d77caf2031ebed1f
tree8de0d1ee8e64546372f734d4c732ea1654cb248a
parent3eb9fde4926fc56fd3d82cd9a435405886bb62ab
<webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit

Reviewed by Darin Adler.

Add an explicit overflow check prior to allocating our buffer,
rather than implicitly relying on the guard in convertUTF16ToUTF8.

* wtf/text/WTFString.cpp:
(WTF::String::utf8):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/text/WTFString.cpp