Fix crash from fdo#508686

Change-Id: If98cbbe880055a1e596eefe75744c41513c9aa16
This commit is contained in:
Fridrich Štrba
2012-06-09 00:10:56 +02:00
parent 2a72e15e6a
commit e71749a089
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
--- misc/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-05-31 15:14:42.000000000 +0200
+++ misc/build/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-09 00:08:24.139051461 +0200
@@ -2059,7 +2059,11 @@
void libvisio::VSDXContentCollector::_convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format)
{
+ if (!data.size())
+ return;
WPXInputStream *pStream = const_cast<WPXInputStream *>(data.getDataStream());
+ if (!pStream)
+ return;
if (format == VSD_TEXT_ANSI)
{
while (!pStream->atEOS())

View File

@@ -57,6 +57,8 @@ INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpg
TARFILE_NAME=libvisio-0.0.17
TARFILE_MD5=90010e213dd25648e70f0cc12f8fed55
PATCH_FILES=\
$(TARFILE_NAME).patch
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
BUILD_DIR=src$/lib