diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-12-16 14:21:49 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-02 16:43:02 +0100 |
commit | 5295aab4e60ead820305d66ab8a6b5712e5fca33 (patch) | |
tree | 812a09dcf5aca9ca0f536296a76bf63396184b57 /src | |
parent | f29e55448b8e0c0a156e3af960589c6733cc4d7d (diff) |
Fix crash in positionInLigature
Check boundary of pos before accessing attributes.
Task-number: QTBUG-23104
Change-Id: I0bc93dbe320badc65acc75bb59b27f481e69b93e
Reviewed-by: Eskil
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index d223b2ec37..d2c37d451d 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2692,7 +2692,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end, closestItem--; int pos = si->position + clusterStart + closestItem; // Jump to the next charStop - while (!attrs[pos].charStop && pos < end) + while (pos < end && !attrs[pos].charStop) pos++; return pos; } |