diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-09 00:12:08 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-09 00:14:50 +0200 |
commit | 214c3b9002944ff5d05e249051e45f135e1b4943 (patch) | |
tree | b50a25426472d8f5e01ad1032e8d0cfa5f988024 | |
parent | 18a3f64a8d2be07a610fc035ca61186510ad036f (diff) |
Fix potential further crashes like the one in fdo#50868
Change-Id: I8bdce8091d7f93b311cb4e15134eb2d7c34ae22f
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
-rw-r--r-- | libwpd/libwpd-0.9.4.patch | 18 | ||||
-rw-r--r-- | libwpd/makefile.mk | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libwpd/libwpd-0.9.4.patch b/libwpd/libwpd-0.9.4.patch new file mode 100644 index 000000000000..e7892be1aaef --- /dev/null +++ b/libwpd/libwpd-0.9.4.patch @@ -0,0 +1,18 @@ +--- 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: */ diff --git a/libwpd/makefile.mk b/libwpd/makefile.mk index 5e0bfd5db325..504fb48972fb 100644 --- a/libwpd/makefile.mk +++ b/libwpd/makefile.mk @@ -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 |