summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-28 10:43:05 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-28 11:16:14 (GMT)
commit45bd1e737f2f76bbc9943995734c6ecb0a23935b (patch)
treeed66dc8c1eff9b8d6dd93ef3b0bc7a3cd888de80 /tests
parentcdbb761416996efef99e6eccc7f42730d64f35cb (diff)
downloadQt-45bd1e737f2f76bbc9943995734c6ecb0a23935b.zip
Qt-45bd1e737f2f76bbc9943995734c6ecb0a23935b.tar.gz
Qt-45bd1e737f2f76bbc9943995734c6ecb0a23935b.tar.bz2
Fixed infinite loop in QPainterPath::intersects() when qreal=float.
Similar to c30714122c58a3dc6fd8401427da60c4afc4127b, we need to limit the max number of recursions. Task-number: QTBUG-16422 Reviewed-by: Kim
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 4ade9ad..bc3b5d9 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -411,6 +411,10 @@ void tst_QPainterPath::intersects_QRectF_data()
QTest::newRow("horizontal line") << linePath(0, 0, 10, 0) << QRectF(1, -1, 2, 2) << true;
QTest::newRow("vertical line") << linePath(0, 0, 0, 10) << QRectF(-1, 1, 2, 2) << true;
+
+ path = QPainterPath();
+ path.addEllipse(QRectF(-5000.0, -5000.0, 1500000.0, 1500000.0));
+ QTest::newRow("huge ellipse, qreal=float crash") << path << QRectF(1100000.35, 1098000.2, 1500000.0, 1500000.0) << true;
}
void tst_QPainterPath::intersects_QRectF()