diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-05-24 20:36:21 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-05-24 20:36:21 +0200 |
commit | 03764e29978bcf0b59a3738166b5af31d0af582a (patch) | |
tree | d63be72cdf4b4e2cf749e97d48dfab6225392326 /libvisio | |
parent | d1384b4253325764ea2cf30b7afa86ce27ef418f (diff) |
Resolves: fdo#50178 Reading Visio file causes crash
Problem with iterators, more info here :
http://nabble.documentfoundation.org/PATCH-fix-proposed-for-fdo-50178-Visio-td3985678.html
Change-Id: Ie7131e8bc79539b3a2a5f86608a4574e1ac0fbf8
Diffstat (limited to 'libvisio')
-rw-r--r-- | libvisio/libvisio-0.0.16-fdo50178.patch | 29 | ||||
-rw-r--r-- | libvisio/makefile.mk | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/libvisio/libvisio-0.0.16-fdo50178.patch b/libvisio/libvisio-0.0.16-fdo50178.patch new file mode 100644 index 000000000000..e05887a5987b --- /dev/null +++ b/libvisio/libvisio-0.0.16-fdo50178.patch @@ -0,0 +1,29 @@ +--- misc/build/libvisio-0.0.16/src/lib/VSDXContentCollector.cpp 2012-04-14 17:29:03.000000000 +0200 ++++ misc/libvisio-0.0.16/src/lib/VSDXContentCollector.cpp 2012-05-23 22:30:44.542099908 +0200 +@@ -1470,7 +1470,8 @@ + /* NURBS with incomplete data */ + void libvisio::VSDXContentCollector::collectNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID) + { +- std::map<unsigned, NURBSData>::const_iterator iter; ++ std::map<unsigned, NURBSData>::const_iterator iter; ++ std::map<unsigned, NURBSData>::const_iterator iterEnd; + NURBSData data; + if (dataID == 0xFFFFFFFE) // Use stencil NURBS data + { +@@ -1490,13 +1491,15 @@ + } + dataID = tmpElement->m_dataID; + iter = m_stencilShape->m_nurbsData.find(dataID); ++ iterEnd = m_stencilShape->m_nurbsData.end(); + } + else // No stencils involved, directly get dataID and fill in missing parts + { + iter = m_NURBSData.find(dataID); ++ iterEnd = m_NURBSData.end(); + } + +- if (iter != m_NURBSData.end()) ++ if (iter != iterEnd) + { + data = iter->second; + data.knots.push_back(knot); diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk index 2a1be7eaa1e5..29e8658eb152 100644 --- a/libvisio/makefile.mk +++ b/libvisio/makefile.mk @@ -59,6 +59,7 @@ TARFILE_MD5=2fa6028324347860e684e75310818d43 PATCH_FILES=\ $(TARFILE_NAME)-nothrow.patch \ + $(TARFILE_NAME)-fdo50178.patch \ $(TARFILE_NAME).patch |