[webkit-reviews] review denied: [Bug 11131] Repeated string concatenation results in OOM crash : [Attachment 12680] Possible patch

bugzilla-request-daemon at macosforge.org bugzilla-request-daemon at macosforge.org
Fri Jan 26 06:11:05 PST 2007


Andrew Wellington <proton at wiretapped.net> has denied Andrew Wellington
<proton at wiretapped.net>'s request for review:
Bug 11131: Repeated string concatenation results in OOM crash
http://bugs.webkit.org/show_bug.cgi?id=11131

Attachment 12680: Possible patch
http://bugs.webkit.org/attachment.cgi?id=12680&action=edit

------- Additional Comments from Andrew Wellington <proton at wiretapped.net>
OK, I've never done anything in JavaScriptCore before so this may be totally
wrong... but still it does fix the issue :-)

It's relatively simple: in UString::UString(const UString &a, const UString &b)
we check for the out-of-memory case in the allocation which returns NULL and
then return a null UString instead of blindly trying a memcpy which will crash.
Then KJS::add checks if it receives a null UString from its add operation, and
if so throws an exception, otherwise we continue on as we did before.



More information about the webkit-reviews mailing list