⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 235416 in webkit


Ignore:
Timestamp:
Aug 27, 2018, 5:37:17 PM (8 years ago)
Author:
mmaxfield@apple.com
Message:

Null pointer deref in WidthIterator
https://bugs.webkit.org/show_bug.cgi?id=188993

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/text/rtl-justification.html

We simply need to guard glyphBuffer like we do in the rest of the function.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/rtl-justification-expected.html: Added.
  • fast/text/rtl-justification.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r235415 r235416  
     12018-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Null pointer deref in WidthIterator
     4        https://bugs.webkit.org/show_bug.cgi?id=188993
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * fast/text/rtl-justification-expected.html: Added.
     9        * fast/text/rtl-justification.html: Added.
     10
    1112018-08-27  Sihui Liu  <sihui_liu@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r235414 r235416  
     12018-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Null pointer deref in WidthIterator
     4        https://bugs.webkit.org/show_bug.cgi?id=188993
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Test: fast/text/rtl-justification.html
     9
     10        We simply need to guard glyphBuffer like we do in the rest of the function.
     11
     12        * platform/graphics/WidthIterator.cpp:
     13        (WebCore::WidthIterator::advanceInternal):
     14
    1152018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r234808 r235416  
    346346    }
    347347
    348     if (leftoverJustificationWidth) {
     348    if (glyphBuffer && leftoverJustificationWidth) {
    349349        if (m_forTextEmphasis)
    350350            glyphBuffer->add(lastFontData->zeroWidthSpaceGlyph(), lastFontData, leftoverJustificationWidth, m_run.length() - 1);
Note: See TracChangeset for help on using the changeset viewer.