[Libreoffice-commits] libvisio.git: 2 commits - src/lib
David Tardon
dtardon at redhat.com
Mon Aug 3 09:39:35 PDT 2015
src/lib/VSD5Parser.cpp | 2 +-
src/lib/VSDInternalStream.cpp | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 3a97bddcfb4a6d8cbd1899acad18d34f46e274ea
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 3 18:34:36 2015 +0200
assign the whole buffer at once
Change-Id: I6f83bd1a4da66a80a6e640f86b2eba55d54a7696
diff --git a/src/lib/VSDInternalStream.cpp b/src/lib/VSDInternalStream.cpp
index 9cc2eb4..9d69c39 100644
--- a/src/lib/VSDInternalStream.cpp
+++ b/src/lib/VSDInternalStream.cpp
@@ -25,8 +25,7 @@ VSDInternalStream::VSDInternalStream(librevenge::RVNGInputStream *input, unsigne
if (!compressed)
{
- for (unsigned long i=0; i<tmpNumBytesRead; i++)
- m_buffer.push_back(tmpBuffer[i]);
+ m_buffer.assign(tmpBuffer, tmpBuffer + tmpNumBytesRead);
}
else
{
commit 102b5084f3adf9fea175c9eaa856e43fb7065121
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 3 18:30:07 2015 +0200
afl: avoid null ptr deref.
Change-Id: I34ea438223cd32551123c97bb951a301307e5029
diff --git a/src/lib/VSD5Parser.cpp b/src/lib/VSD5Parser.cpp
index 79b638b..7120c79 100644
--- a/src/lib/VSD5Parser.cpp
+++ b/src/lib/VSD5Parser.cpp
@@ -289,7 +289,7 @@ void libvisio::VSD5Parser::readFillAndShadow(librevenge::RVNGInputStream *input)
{
double shadowOffsetX = 0.0;
double shadowOffsetY = 0.0;
- if (m_isStencilStarted)
+ if (m_isStencilStarted && m_currentStencil)
{
VSD_DEBUG_MSG(("Found stencil fill\n"));
shadowOffsetX = m_currentStencil->m_shadowOffsetX;
More information about the Libreoffice-commits
mailing list