summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-14 13:35:22 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-14 15:18:10 (GMT)
commitc30714122c58a3dc6fd8401427da60c4afc4127b (patch)
treeb54f010500472e7998f93177a861565bb907687b /tests
parent1b3514e4b2d9a41f73bf5b87caf73ce409eadf2a (diff)
downloadQt-c30714122c58a3dc6fd8401427da60c4afc4127b.zip
Qt-c30714122c58a3dc6fd8401427da60c4afc4127b.tar.gz
Qt-c30714122c58a3dc6fd8401427da60c4afc4127b.tar.bz2
Prevented infinite recursion in QPainterPath::contains().
Limit the amount of recursions in qt_painterpath_isect_curve to prevent a crash. Task-number: QTBUG-16422 Reviewed-by: Kim
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 00f9b91..4ade9ad 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -290,6 +290,11 @@ void tst_QPainterPath::contains_QPointF_data()
QTest::newRow("horizontal cubic, out left") << path << QPointF(0, 100) << false;
QTest::newRow("horizontal cubic, out right") << path << QPointF(300, 100) <<false;
QTest::newRow("horizontal cubic, in mid") << path << QPointF(150, 100) << true;
+
+ path = QPainterPath();
+ path.addEllipse(QRectF(-5000.0, -5000.0, 1500000.0, 1500000.0));
+ QTest::newRow("huge ellipse, qreal=float crash") << path << QPointF(1100000.35, 1098000.2) << true;
+
}
void tst_QPainterPath::contains_QPointF()