Crash in WTF::StringBuilder::append()
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 03:03:39 +0000 (03:03 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 03:03:39 +0000 (03:03 +0000)
commit1c3f7843d1712b925fd0c6464f6cb5e88efe4d5d
tree2952ea217feaf459750e869f46eaaf791d342070
parenta1ac56a79a36b8db8191da906268f81db1cd911f
Crash in WTF::StringBuilder::append()

https://bugs.webkit.org/show_bug.cgi?id=125817
<rdar://problem/15671883>

Reviewed by Oliver Hunt.

* wtf/text/StringBuilder.cpp:
(WTF::expandedCapacity):
Ensure that we return a new capacity of at least 'requiredLength' in
the case where requiredLength is large. Also, use unsigned rather than
size_t for the parameters and the return value, as callers pass
unsigned arguments and treat the result as an unsigned int.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringBuilder.cpp