external/libnumbertext/Afl++ICE.patch1 | 30 ++++++++++++++++ external/libnumbertext/UnpackedTarball_libnumbertext.mk | 1 2 files changed, 31 insertions(+)
New commits: commit 771a256685ca44481252fac6854e88ff6630298d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 24 15:37:08 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 24 21:22:01 2021 +0100 ofz#30767 Build-Failure similar to commit 63a9b50a7a062069af3e3bcf05657164179baa83 afl++ build crashes for some obscure reason. Tweaking the code like so gets it to squeak by and continue the build. Change-Id: I8cf477320eab19913c1bb65d9ccb779d9c37c8aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111491 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/external/libnumbertext/Afl++ICE.patch1 b/external/libnumbertext/Afl++ICE.patch1 new file mode 100644 index 000000000000..62104200632d --- /dev/null +++ b/external/libnumbertext/Afl++ICE.patch1 @@ -0,0 +1,30 @@ +--- /src/Soros.cxx 2021-02-24 15:31:59.003956770 +0000 ++++ /src/Soros.cxx 2021-02-24 15:32:29.156601577 +0000 +@@ -45,6 +45,9 @@ + begins(0), + ends(0) + { ++ const std::wstring_view numbertext = L"__numbertext__"; ++ const std::wstring_view semicolon = L";"; ++ + program = translate(program, m, c, L"\\"); // \\, \", \;, \# -> \uE000..\uE003 + // switch off all country-dependent lines, and switch on the requested ones + program = regex_replace(program, wregex(L"(^|[\n;])([^\n;#]*#[^\n]*\\[:[^\n:\\]]*:\\][^\n]*)"), L"$1#$2"); +@@ -52,7 +55,7 @@ + program = regex_replace(program, wregex(L"(^|[\n;])#([^\n;#]*#[^\n]*\\[:" + filtered_lang + L":\\][^\n]*)"), L"$1$2"); + program = regex_replace(program, wregex(L"(#[^\n]*)?(\n|$)"), L";"); // remove comments + // __numbertext__ sets the place of left zero deletion rule +- if (program.find(L"__numbertext__") == std::wstring::npos) ++ if (program.find(numbertext) == std::wstring::npos) + program.insert(0, L"__numbertext__;"); + program = regex_replace(program, wregex(L"__numbertext__"), + // default left zero deletion +@@ -69,7 +72,7 @@ + wregex quoteStart(L"^\""); + wregex quoteEnd(L"\"$"); + std::wstring smacro; +- while ((pos = program.find(L";", pos)) != std::wstring::npos) { ++ while ((pos = program.find(semicolon, pos)) != std::wstring::npos) { + wsmatch sp; + std::wstring linOrig = program.substr(old_pos, pos - old_pos); + // pattern extension after == macro ==: diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..1238290049d1 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/Afl++ICE.patch1 \ )) # vim: set noet sw=4 ts=4: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits