[Webkit-unassigned] [Bug 19542] New: Crash in Font::glyphDataForCharacter when getting small caps data

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 13 18:22:44 PDT 2008


           Summary: Crash in Font::glyphDataForCharacter when getting small
                    caps data
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P1
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: marv.decker at gmail.com

In Font::glyphDataForCharacter there is this code

  GlyphPageTreeNode* smallCapsNode =
      GlyphPageTreeNode::getRootChild(smallCapsFontData, pageNumber);
  const GlyphData& data = smallCapsNode->page()->glyphDataForCharacter(c);

I got a crash report that shows page() returning NULL here, which caused a
crash, although I do not have a repro. In GlyphPageTreeNode.h, it says:

// Returns a page of glyphs (or NULL if there are no glyphs in this page's
character range).
GlyphPage* page() const { return m_page.get(); }

So it looks like this Font.cpp code is wrong. Other callers of page() in this
function NULL check it, but not this small caps case. It looks like we just
need to add a check here.

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

More information about the webkit-unassigned mailing list