[Webkit-unassigned] [Bug 11131] Repeated string concatenation results in OOM crash

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 26 06:11:06 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=11131


proton at wiretapped.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12680|                            |review-
               Flag|                            |




------- Comment #7 from proton at wiretapped.net  2007-01-26 06:11 PDT -------
Created an attachment (id=12680)
 --> (http://bugs.webkit.org/attachment.cgi?id=12680&action=view)
Possible patch

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.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list