[Webkit-unassigned] [Bug 78435] UString.h will crash if is8bit is checked and UString::isNull() == true

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 12 13:32:31 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78435





--- Comment #7 from Adam Treat <atreat at rim.com>  2012-02-12 13:32:31 PST ---
(In reply to comment #6)
> (In reply to comment #4)
> > (In reply to comment #0)
> > > If you look at UString.h it seems that it is just a wrapper around WTF::StringImpl.  Most of the functions in UString.h check if it is null, but not UString::is8bit.  This can lead to a null pointer de-reference.  For instance, if you do this...
> > > 
> > >     m_mainFrame->script()->evaluateInWorld(ScriptSourceCode(""), ...);
> > 
> > This looks similar to r106600
> 
> Both fix the crash in the case of null source code, but this makes UString::is8Bit safe for UString::isNull() == true.
> 
> I don't get the inconsistent comment.  If anything, UString::is8Bit() is inconsistent with all the other methods in UString!

Or did you meant that StringImpl::is8Bit() will return true for a null string?

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



More information about the webkit-unassigned mailing list