summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-30 14:39:08 +0200
committerEike Rathke <erack@redhat.com>2017-07-03 21:03:06 +0200
commit0acf23e1ad2bee0e2405c138619e2bb6ed0fba19 (patch)
tree6d01ee8e24070462d457a8a1f93f8f06a373460e /external
parent7b1abc47af7a64ab8d3204cb85f173f0023da3ff (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> Reviewed-on: https://gerrit.libreoffice.org/39424 Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'external')
-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 5d09d6de7ccd..93b988553116 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
external/liborcus/rpath.patch.0 \
external/liborcus/visibility.patch.0 \
+ 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());
+ }