From 5500dbbbad794d171588a3f954ca28c42b9494d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 9 Jul 2018 17:16:13 +0200 Subject: [PATCH] Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect --- ...gexec.c-Call-macro-with-correct-args.patch | 32 +++++++++++++++++++ perl.spec | 8 +++++ 2 files changed, 40 insertions(+) create mode 100644 perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch diff --git a/perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch b/perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch new file mode 100644 index 0000000..cdecb18 --- /dev/null +++ b/perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch @@ -0,0 +1,32 @@ +From e1a2878a55b1a7f11f19b384c4ea5235c29866b2 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Mon, 11 Jun 2018 13:28:53 -0600 +Subject: [PATCH] regexec.c: Call macro with correct args. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The second argument to this macro is a pointer to the end, as opposed to +a length. + +Signed-off-by: Petr Písař +--- + regexec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/regexec.c b/regexec.c +index 7ed8f4fabc..ba52ae97c7 100644 +--- a/regexec.c ++++ b/regexec.c +@@ -1808,7 +1808,7 @@ STMT_START { + case trie_flu8: \ + _CHECK_AND_WARN_PROBLEMATIC_LOCALE; \ + if (UTF8_IS_ABOVE_LATIN1(*uc)) { \ +- _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end - uc); \ ++ _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end); \ + } \ + goto do_trie_utf8_fold; \ + case trie_utf8_exactfa_fold: \ +-- +2.14.4 + diff --git a/perl.spec b/perl.spec index 34e9a15..0814b83 100644 --- a/perl.spec +++ b/perl.spec @@ -157,6 +157,10 @@ Patch15: perl-5.29.0-Remove-ext-GDBM_File-t-fatal.t.patch # RT#133204, in upstream after 5.29.0 Patch16: perl-5.29.0-Perl_my_setenv-handle-integer-wrap.patch +# Fix printing a warning about a wide character when matching a regular +# expression while ISO-8859-1 locale is in effect +Patch17: perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -2727,6 +2731,7 @@ Perl extension for Version Objects %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 %patch200 -p1 %patch201 -p1 @@ -2750,6 +2755,7 @@ perl -x patchlevel.h \ 'Fedora Patch14: Link XS modules to pthread library to fix linking with -z defs' \ 'Fedora Patch15: Adjust tests to gdbm-1.15 (RT#133295)' \ 'Fedora Patch16: Fix an integer wrap when allocating memory for an environment variable (RT#133204)' \ + 'Fedora Patch17: Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -5042,6 +5048,8 @@ popd - Adjust tests to gdbm-1.15 (RT#133295) - Fix an integer wrap when allocating memory for an environment variable (RT#133204) +- Fix printing a warning about a wide character when matching a regular + expression while ISO-8859-1 locale is in effect * Wed Jun 27 2018 Jitka Plesnikova - 4:5.28.0-416 - Stop providing old perl(MODULE_COMPAT_5.26.*)