[Webkit-unassigned] [Bug 70107] Custom written CSS lexer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 13 00:14:02 PST 2011


--- Comment #24 from Oliver Hunt <oliver at apple.com>  2011-12-13 00:14:01 PST ---

> > > Source/WebCore/css/CSSParser.cpp:7394
> > > +        || (data[0] == '\\' && isCSSEscape(data[1]));
> > 
> > How do we guarantee data is at least 2 characters long?
> C++ has a short circuit expression evaluation method, so data[0] == '\\' must be true before it checks data[1].
Oh right, and we guarantee null termination so even if i have a \ at the end of input this will work.

I don't really like all these dependencies on having 1+ null terminations on the input as it will make it harder to safely move to a non-copying lexer in future, but i recognize this is essentially existing behavior so you don't need to change it in this patch.

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