summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-10-17 10:35:34 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-17 10:35:34 +0200
commit410f564d9a728b983cf11ba9b3eadfc7d59c187c (patch)
tree730e906976861fea96e1802a7e2b5ea5b59aad85
parent1cd13d6b94c8cc432cce2d2811a79bfe58d57275 (diff)
fdo#70480 do not crash reading malformed zip
Change-Id: Ia37e8be5172a49669cb9f7271c5401ca88f39072
-rw-r--r--src/lib/VSDZipStream.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/VSDZipStream.cpp b/src/lib/VSDZipStream.cpp
index 3b3e08a..1c12d56 100644
--- a/src/lib/VSDZipStream.cpp
+++ b/src/lib/VSDZipStream.cpp
@@ -203,6 +203,8 @@ bool libvisio::VSDZipStreamImpl::isZipStream()
return false;
if (!readCentralDirectory(end))
return false;
+ if (m_cdir.empty())
+ return false;
CentralDirectoryEntry entry = m_cdir.begin()->second;
m_input->seek(entry.offset, WPX_SEEK_SET);
LocalFileHeader header;