Kaydet (Commit) ec822b7b authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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/39413Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst caf1dded
......@@ -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 -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());
}
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