summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-12-14 15:33:09 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-12-15 12:38:20 (GMT)
commit6c10c6b1dead65c4fef0fb04295cd360a54f5186 (patch)
tree6c94f4dd52966f4e4c98470d354e0eac9ec6657b /src/opengl
parentac41c7da1e7da954e48ebdcefb1de53ce2911e75 (diff)
downloadQt-6c10c6b1dead65c4fef0fb04295cd360a54f5186.zip
Qt-6c10c6b1dead65c4fef0fb04295cd360a54f5186.tar.gz
Qt-6c10c6b1dead65c4fef0fb04295cd360a54f5186.tar.bz2
Fixed integer overflow in QTriangulator.
The result of a function returning qint64 was stored in an int.
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opengl/gl2paintengineex/qtriangulator.cpp b/src/opengl/gl2paintengineex/qtriangulator.cpp
index 21d4b2e..6a1112b 100644
--- a/src/opengl/gl2paintengineex/qtriangulator.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulator.cpp
@@ -1779,7 +1779,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
if (d == 0) {
result.first = result.second = current;
break;
@@ -1793,7 +1793,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
Q_ASSERT(d >= 0);
if (d == 0) {
result.first = current;
@@ -1807,7 +1807,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
Q_ASSERT(d <= 0);
if (d == 0) {
result.second = current;
@@ -1828,7 +1828,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
if (d == 0)
break;
if (d < 0) {
@@ -1849,7 +1849,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
Q_ASSERT(d >= 0);
if (d == 0) {
current = current->left;
@@ -1863,7 +1863,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple
while (current) {
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
- int d = qPointDistanceFromLine(point, v1, v2);
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
Q_ASSERT(d <= 0);
if (d == 0) {
current = current->right;