summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2014-01-21 08:44:45 +0100
committerDavid Tardon <dtardon@redhat.com>2014-01-21 08:24:54 +0000
commit97269ea7b1a16bb0dd692307c903e63888545efa (patch)
treea02da3c012d3616c0100756220eb5335c106153a
parent5eb37896ca344276cc0753ad93b822d7be9b21d6 (diff)
Coverity: Potential crash (?)
Change-Id: I819b0df446cf95d511d6a7a5a65c381a2a837d00 (cherry picked from commit 7989850e9fc5fb2fb757ecf388b51bc3e96a0267) Reviewed-on: https://gerrit.libreoffice.org/7562 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--external/libabw/UnpackedTarball_libabw.mk1
-rw-r--r--external/libabw/libabw-0.0.1-stdstringfromnull.patch.111
2 files changed, 12 insertions, 0 deletions
diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk
index c61f2d55924b..4f8b44002efa 100644
--- a/external/libabw/UnpackedTarball_libabw.mk
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libabw,$(ABW_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,libabw,\
external/libabw/libabw-0.0.1-inttypes.patch.1 \
+ external/libabw/libabw-0.0.1-stdstringfromnull.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libabw/libabw-0.0.1-stdstringfromnull.patch.1 b/external/libabw/libabw-0.0.1-stdstringfromnull.patch.1
new file mode 100644
index 000000000000..fccaa8ee2173
--- /dev/null
+++ b/external/libabw/libabw-0.0.1-stdstringfromnull.patch.1
@@ -0,0 +1,11 @@
+--- a/src/lib/ABWContentCollector.cpp
++++ b/src/lib/ABWContentCollector.cpp
+@@ -643,7 +643,7 @@ void libabw::ABWContentCollector::collectHeaderFooter(const char *id, const char
+ if (!type)
+ m_ps->m_currentHeaderFooterId = -1;
+
+- std::string sType(type);
++ std::string sType(type ? type : "");
+ boost::trim(sType);
+ std::vector<std::string> strVec;
+ boost::algorithm::split(strVec, sType, boost::is_any_of("-"), boost::token_compress_on);