summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-10-19 20:01:14 +0200
committerDavid Tardon <dtardon@redhat.com>2017-10-19 20:01:14 +0200
commit916a0cf635f351e22b44de27ba42e9654b4ee29f (patch)
treea920f0e6d89c9584b86dd104a3455af8fcf491ba
parentdc81ff725f10744ee9455a55b3c627bc02b78ab1 (diff)
ofz#2521 fix OOB read from vector
Change-Id: Ia6b08452dca71ae68bb0e9f2692ffdd75da9f537
-rw-r--r--src/lib/VSDContentCollector.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index bfbba28..7361668 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -2024,6 +2024,9 @@ void libvisio::VSDContentCollector::_generateBezierSegmentsFromNURBS(unsigned de
{
for (i=degree-mult; i <= degree; i++)
{
+ // FIXME: I've absolutely no idea how this can happen, but it can...
+ if (b-degree+i >= controlPoints.size())
+ break;
points[i].first = controlPoints[b-degree+i].first;
points[i].second = controlPoints[b-degree+i].second;
}