Changeset 156879 in webkit


Ignore:
Timestamp:
Oct 3, 2013, 9:42:02 PM (12 years ago)
Author:
andersca@apple.com
Message:

Assert that we don't try to index past the end of the m_coreTextIndices array
https://bugs.webkit.org/show_bug.cgi?id=122308

Reviewed by Dan Bernstein.

Because an assertion failure is better than a random crash.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::ComplexTextRun::indexAt):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r156876 r156879  
     12013-10-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Assert that we don't try to index past the end of the m_coreTextIndices array
     4        https://bugs.webkit.org/show_bug.cgi?id=122308
     5
     6        Reviewed by Dan Bernstein.
     7
     8        Because an assertion failure is better than a random crash.
     9
     10        * platform/graphics/mac/ComplexTextController.cpp:
     11        (WebCore::ComplexTextController::ComplexTextRun::indexAt):
     12
    1132013-10-03  Antti Koivisto  <antti@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r156613 r156879  
    387387CFIndex ComplexTextController::ComplexTextRun::indexAt(size_t i) const
    388388{
     389    ASSERT(i < m_glyphCount);
     390
    389391    return m_coreTextIndices[i];
    390392}
Note: See TracChangeset for help on using the changeset viewer.