[Libreoffice-commits] libvisio.git: 3 commits - src/lib
David Tardon
dtardon at redhat.com
Fri Jul 17 12:44:17 PDT 2015
src/lib/VSD5Parser.cpp | 1 +
src/lib/VSDParser.cpp | 2 +-
src/lib/VSDXMLParserBase.cpp | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit fcddf7e158245164b3e58b52bbd358eb1b10f07a
Author: David Tardon <dtardon at redhat.com>
Date: Fri Jul 17 17:58:22 2015 +0200
do not leave dangling ptr around
Change-Id: I135e6e765bf365c3db41b38e169403b6b13a6ea1
diff --git a/src/lib/VSD5Parser.cpp b/src/lib/VSD5Parser.cpp
index 1f1cef0..00cbf06 100644
--- a/src/lib/VSD5Parser.cpp
+++ b/src/lib/VSD5Parser.cpp
@@ -310,6 +310,7 @@ void libvisio::VSD5Parser::readStyleSheet(librevenge::RVNGInputStream *input)
void libvisio::VSD5Parser::readShape(librevenge::RVNGInputStream *input)
{
m_currentGeomListCount = 0;
+ m_currentGeometryList = 0;
m_isShapeStarted = true;
m_shapeList.clear();
if (m_header.id != MINUS_ONE)
commit 8a4ec7e656c1ad36d257d267c2faa743f5d93416
Author: David Tardon <dtardon at redhat.com>
Date: Fri Jul 17 15:53:49 2015 +0200
do not leave dangling ptr around
Change-Id: I4f8de0afaa5e8f7c8f2ff7d5c3bb7369b9b93924
diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index 12fe447..33afca9 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -63,6 +63,7 @@ void libvisio::VSDXMLParserBase::readGeometry(xmlTextReaderPtr reader)
{
m_currentGeometryList->clear();
m_shape.m_geometries.erase(ix);
+ m_currentGeometryList = 0;
}
}
return;
commit bafa63b6c6c9f620bff667d48668aa80df843cea
Author: David Tardon <dtardon at redhat.com>
Date: Fri Jul 17 15:52:12 2015 +0200
avoid null ptr deref.
Change-Id: I55fe94df71bda97ba5e4e8fe14160c27befe1a0b
diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 3cb284a..6ce32eb 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -866,7 +866,7 @@ void libvisio::VSDParser::readTextBlock(librevenge::RVNGInputStream *input)
void libvisio::VSDParser::readGeomList(librevenge::RVNGInputStream *input)
{
- if (!m_shape.m_geometries.empty() && m_currentGeometryList->empty())
+ if (!m_shape.m_geometries.empty() && m_currentGeometryList && m_currentGeometryList->empty())
m_shape.m_geometries.erase(--m_currentGeomListCount);
// Since this is a map, this will default construct an element and then
// the m_currentGeometryList pointer takes its address and we will work
More information about the Libreoffice-commits
mailing list