summaryrefslogtreecommitdiff
path: root/external
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:19:25 +0200
commit35ca93f7892e8f19b871f7f687a9f7e4933a65ad (patch)
treea31e949e2e386d443bb2677c802b297ac7ca4a1e /external
parent9de4cafcf0efdc2986c3130658ee9233df392773 (diff)
crashtesting: fix assert seen on loading forum-nl-1226.ods
Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136480 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-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: