summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-27 09:40:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-06-27 13:36:04 +0200
commita095f58d981569cbe79d724a301ed04f0f92748d (patch)
treef13b2ca597a9f29b64e355f03e5e1671fabfc56b
parenthandle nullptr SharedString in ScQueryEvaluator (tdf#149679) (diff)
downloadcore-a095f58d981569cbe79d724a301ed04f0f92748d.tar.gz
core-a095f58d981569cbe79d724a301ed04f0f92748d.zip
crashtesting: fix assert seen on loading forum-nl-1226.ods
Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136467 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
-rw-r--r--external/libnumbertext/EmptyString.patch113
-rw-r--r--external/libnumbertext/UnpackedTarball_libnumbertext.mk1
2 files changed, 14 insertions, 0 deletions
diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1
new file mode 100644
index 000000000000..d6570117da09
--- /dev/null
+++ b/external/libnumbertext/EmptyString.patch1
@@ -0,0 +1,13 @@
+--- a/src/Soros.cxx 2022-06-27 09:36:46.486075920 +0100
++++ b/src/Soros.cxx 2022-06-27 09:37:52.594072196 +0100
+@@ -98,8 +98,8 @@
+ s = regex_replace(s, quoteEnd, L"");
+ s = translate(s, c.substr(1), m.substr(1), L"");
+ replace(s, slash, L"\\\\"); // -> \\, ", ;, #
+- begins.push_back(s[0] == L'^');
+- ends.push_back(s[s.length()-1] == L'$');
++ begins.push_back(!s.empty() && s[0] == L'^');
++ ends.push_back(!s.empty() && s[s.length()-1] == L'$');
+ s = L"^" + regex_replace(s, wregex(L"^\\^"), L"");
+ s = regex_replace(s, wregex(L"\\$$"), L"") + L"$";
+ try
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 48cd2a9a273d..fb88366d5aef 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
external/libnumbertext/MSVCNonBMPBug.patch1 \
external/libnumbertext/WinUnicodePath.patch1 \
+ external/libnumbertext/EmptyString.patch1 \
))
# vim: set noet sw=4 ts=4: