summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-30 14:39:08 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-30 18:12:20 +0200
commitec822b7b716ebb14e717513aeaaf97a45b98bee9 (patch)
tree9456b5e6351d5bb77bd1c4817cf78db7a1dec634
parentcaf1ddedbef77ac648d8b8b35978a0613aa77da6 (diff)
fix crash on windows with nullptr in operator<<
E.g. http://crashreport.libreoffice.org/stats/crash_details/8962b764-6550-45c9-b08b-e99f5c968d61 Change-Id: I1153c0ab35266006ada10611e79b770ef1c0cd4f Reviewed-on: https://gerrit.libreoffice.org/39413 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk1
-rw-r--r--external/liborcus/nullptr-in-ostringstream.patch.112
2 files changed, 13 insertions, 0 deletions
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index 0f94f73490fc..b37384e65d62 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/visibility.patch.0 \
external/liborcus/iOS.patch \
+ external/liborcus/nullptr-in-ostringstream.patch.1 \
))
ifeq ($(OS),WNT)
diff --git a/external/liborcus/nullptr-in-ostringstream.patch.1 b/external/liborcus/nullptr-in-ostringstream.patch.1
new file mode 100644
index 000000000000..d8b97ee2c92a
--- /dev/null
+++ b/external/liborcus/nullptr-in-ostringstream.patch.1
@@ -0,0 +1,12 @@
+diff -ur liborcus.org/src/liborcus/xml_context_base.cpp liborcus/src/liborcus/xml_context_base.cpp
+--- liborcus.org/src/liborcus/xml_context_base.cpp 2017-06-30 14:32:19.044195127 +0200
++++ liborcus/src/liborcus/xml_context_base.cpp 2017-06-30 14:34:27.580268421 +0200
+@@ -171,7 +171,7 @@
+
+ // Create a generic error message.
+ ostringstream os;
+- os << "element '" << ns << ":" << m_tokens.get_token_name(name) << "' expected, but '";
++ os << "element '" << (ns ? ns : "") << ":" << m_tokens.get_token_name(name) << "' expected, but '";
+ os << elem.first << ":" << m_tokens.get_token_name(elem.second) << "' encountered.";
+ throw xml_structure_error(os.str());
+ }