projects
/
profile
/
ivi
/
qtbase.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f29e554
)
Fix crash in positionInLigature
author
Jiang Jiang
<jiang.jiang@nokia.com>
Fri, 16 Dec 2011 13:21:49 +0000
(14:21 +0100)
committer
Qt by Nokia
<qt-info@nokia.com>
Mon, 2 Jan 2012 15:43:02 +0000
(16:43 +0100)
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>
src/gui/text/qtextengine.cpp
patch
|
blob
|
history
diff --git
a/src/gui/text/qtextengine.cpp
b/src/gui/text/qtextengine.cpp
index
d223b2e
..
d2c37d4
100644
(file)
--- 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;
}