diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-09-24 12:48:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-25 16:16:15 +0200 |
commit | 63727e4d385a02d15442f4c6c42439f16e2cc193 (patch) | |
tree | a25ec786200900d5c56785c004dbe5d37b4c2d28 /src | |
parent | 15f8ef2f368531d6eecc856093b5e54a2aeb1cd4 (diff) |
Avoid out-of-bounds read.
Change-Id: I28777806b13da1b0a9e1fecc2734de0614f2443c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 6767e3f6c9..0e2a3c05bf 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -1861,7 +1861,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * break; QList<int>::const_iterator lowerBound = std::lower_bound(frameBoundaries.constBegin(), frameBoundaries.constEnd(), block.next().position()); - if (currentNodeSize > nodeBreakingSize || *lowerBound > nodeStart) { + if (currentNodeSize > nodeBreakingSize || lowerBound == frameBoundaries.constEnd() || *lowerBound > nodeStart) { currentNodeSize = 0; d->addCurrentTextNodeToRoot(rootNode, node, nodeIterator, nodeStart); node = d->createTextNode(); |