summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-14 14:35:22 +0100
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-14 16:18:10 +0100
commitc30714122c58a3dc6fd8401427da60c4afc4127b (patch)
treeb54f010500472e7998f93177a861565bb907687b /tests/auto
parent1b3514e4b2d9a41f73bf5b87caf73ce409eadf2a (diff)
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/auto')
-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 00f9b91d5d..4ade9ad061 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()