Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3f00535f91586f763507aa8085232b947e1354a8 https://github.com/WebKit/WebKit/commit/3f00535f91586f763507aa8085232b947e1354a8 Author: Myles C. Maxfield <mmaxfi...@apple.com> Date: 2023-06-23 (Fri, 23 Jun 2023)
Changed paths: A LayoutTests/fast/text/bogus-lang-expected.txt A LayoutTests/fast/text/bogus-lang.html M Source/WTF/wtf/text/cf/TextBreakIteratorCFStringTokenizer.h M Source/WTF/wtf/text/icu/TextBreakIteratorICU.h Log Message: ----------- Bogus lang= attributes can cause null pointer derefs (line breaker object fails to be created) https://bugs.webkit.org/show_bug.cgi?id=258483 rdar://110440971 Reviewed by Cameron McCormack. A bogus lang attribute can cause our line breaker objects to fail to be created, causing null pointer derefs. There are 2 possible ways to fix this: 1) If creation fails, try again without a lang 2) If creation fails, mark the text as "there are no line breaking opportunities here" Option 1) is less likely to break content if the author makes a mistake, so that's the option I went with. * LayoutTests/fast/text/bogus-lang-expected.txt: Added. * LayoutTests/fast/text/bogus-lang.html: Added. * Source/WTF/wtf/text/cf/TextBreakIteratorCFStringTokenizer.h: (WTF::TextBreakIteratorCFStringTokenizer::TextBreakIteratorCFStringTokenizer): * Source/WTF/wtf/text/icu/TextBreakIteratorICU.h: (WTF::TextBreakIteratorICU::TextBreakIteratorICU): Canonical link: https://commits.webkit.org/265495@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes