Changeset 177909 in webkit


Ignore:
Timestamp:
Jan 5, 2015 7:05:46 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

[WinCairo] Crash when font data pointer is null.
https://bugs.webkit.org/show_bug.cgi?id=139969

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-01-05
Reviewed by Darin Adler.

Source/WebCore:

Added null pointer check.

Test: fonts/unicode-character-font-crash.html

  • platform/graphics/win/UniscribeController.cpp:

(WebCore::UniscribeController::advance):
(WebCore::UniscribeController::shape):

LayoutTests:

  • fonts/unicode-character-font-crash-expected.txt: Added.
  • fonts/unicode-character-font-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r177882 r177909  
     12015-01-05  peavo@outlook.com  <peavo@outlook.com>
     2
     3        [WinCairo] Crash when font data pointer is null.
     4        https://bugs.webkit.org/show_bug.cgi?id=139969
     5
     6        Reviewed by Darin Adler.
     7
     8        * fonts/unicode-character-font-crash-expected.txt: Added.
     9        * fonts/unicode-character-font-crash.html: Added.
     10
    1112015-01-04  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r177896 r177909  
     12015-01-05  peavo@outlook.com  <peavo@outlook.com>
     2
     3        [WinCairo] Crash when font data pointer is null.
     4        https://bugs.webkit.org/show_bug.cgi?id=139969
     5
     6        Reviewed by Darin Adler.
     7
     8        Added null pointer check.
     9
     10        Test: fonts/unicode-character-font-crash.html
     11
     12        * platform/graphics/win/UniscribeController.cpp:
     13        (WebCore::UniscribeController::advance):
     14        (WebCore::UniscribeController::shape):
     15
    1162015-01-05  Michael Catanzaro  <mcatanzaro@igalia.com>
    217
  • trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp

    r174465 r177909  
    166166        }
    167167
    168         if (m_fallbackFonts && nextFontData != fontData && fontData != m_font.primaryFont())
     168        if (m_fallbackFonts && fontData && nextFontData != fontData && fontData != m_font.primaryFont())
    169169            m_fallbackFonts->add(fontData);
    170170
     
    180180    int itemLength = m_run.rtl() ? indexOfFontTransition + 1 : length - indexOfFontTransition;
    181181    if (itemLength) {
    182         if (m_fallbackFonts && nextFontData != m_font.primaryFont())
     182        if (m_fallbackFonts && nextFontData && nextFontData != m_font.primaryFont())
    183183            m_fallbackFonts->add(nextFontData);
    184184
     
    413413    HRESULT shapeResult = E_PENDING;
    414414    int glyphCount = 0;
     415
     416    if (!fontData)
     417        return false;
     418
    415419    do {
    416420        shapeResult = ScriptShape(hdc, fontData->scriptCache(), str, len, glyphs.size(), &item.a,
Note: See TracChangeset for help on using the changeset viewer.