Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect

This commit is contained in:
Petr Písař 2018-07-09 17:16:13 +02:00
parent 9710c0391a
commit 5500dbbbad
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From e1a2878a55b1a7f11f19b384c4ea5235c29866b2 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
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ř <ppisar@redhat.com>
---
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

View File

@ -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 <jplesnik@redhat.com> - 4:5.28.0-416
- Stop providing old perl(MODULE_COMPAT_5.26.*)