[Libreoffice-commits] .: libvisio/libvisio-0.0.16-fdo50178.patch libvisio/makefile.mk

Julien Nabet serval2412 at kemper.freedesktop.org
Thu May 24 11:43:09 PDT 2012


 libvisio/libvisio-0.0.16-fdo50178.patch |   29 +++++++++++++++++++++++++++++
 libvisio/makefile.mk                    |    1 +
 2 files changed, 30 insertions(+)

New commits:
commit 03764e29978bcf0b59a3738166b5af31d0af582a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu May 24 20:36:21 2012 +0200

    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

diff --git a/libvisio/libvisio-0.0.16-fdo50178.patch b/libvisio/libvisio-0.0.16-fdo50178.patch
new file mode 100644
index 0000000..e05887a
--- /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 2a1be7e..29e8658 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
 
 


More information about the Libreoffice-commits mailing list