Kaydet (Commit) 7575ebe3 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

Fix potential further crashes like the one in fdo#50868

Change-Id: I8bdce8091d7f93b311cb4e15134eb2d7c34ae22f
üst e71749a0
--- misc/libwpd-0.9.4/src/lib/WPXBinaryData.cpp 2011-10-28 15:37:48.000000000 +0200
+++ misc/build/libwpd-0.9.4/src/lib/WPXBinaryData.cpp 2012-06-09 00:02:43.293981048 +0200
@@ -174,7 +174,14 @@
const WPXInputStream *WPXBinaryData::getDataStream() const
{
if (m_binaryDataImpl->m_stream)
+ {
delete (m_binaryDataImpl->m_stream);
- return ((m_binaryDataImpl->m_stream) = new WPXMemoryInputStream(&(m_binaryDataImpl->m_buf[0]), m_binaryDataImpl->m_buf.size()));
+ m_binaryDataImpl->m_stream = 0;
+ }
+ if (m_binaryDataImpl->m_buf.empty())
+ return 0;
+ m_binaryDataImpl->m_stream = new WPXMemoryInputStream(&(m_binaryDataImpl->m_buf[0]), m_binaryDataImpl->m_buf.size());
+ return m_binaryDataImpl->m_stream;
}
+
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
......@@ -49,6 +49,9 @@ TARFILE_MD5=c01351d7db2b205de755d58769288224
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
BUILD_DIR=src$/lib
PATCH_FILES=\
$(TARFILE_NAME).patch
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment