From a37f1593f4bc17311eae591905407c1cc9e561b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Fri, 16 Jun 2017 14:34:04 +0200 Subject: Fix improper casting of a negative interger to unsigned eith-bit type
--- ...UTF8-code-improperly-casting-negative-int.patch | 33 ++++++++++++++++++++++ perl.spec | 7 +++++ 2 files changed, 40 insertions(+) create mode 100644 perl-5.27.0-Fix-131190-UTF8-code-improperly-casting-negative-int.patch diff --git a/perl-5.27.0-Fix-131190-UTF8-code-improperly-casting-negative-int.patch b/perl-5.27.0-Fix-131190-UTF8-code-improperly-casting-negative-int.patch new file mode 100644 index 0000000..f248720 --- /dev/null +++ b/perl-5.27.0-Fix-131190-UTF8-code-improperly-casting-negative-int.patch @@ -0,0 +1,33 @@ +From 2c2da8e7f0f6325fab643997a536072633fa0cf8 Mon Sep 17 00:00:00 2001 +From: Yves Orton <demer...@gmail.com> +Date: Thu, 1 Jun 2017 14:51:44 +0200 +Subject: [PATCH] Fix #131190 - UTF8 code improperly casting negative integer + to U8 in comparison +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit b4972372a75776de3c9e6bd234a398d103677316, +effectively restoring commit ca7eb79a236b41b7722c6800527f95cd76843eed, +and commit 85fde2b7c3f5631fd982f5db735b84dc9224bec0. + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + regexec.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/regexec.c b/regexec.c +index 82128a7..35b88d7 100644 +--- a/regexec.c ++++ b/regexec.c +@@ -5593,6 +5593,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) + if (scan->flags == EXACTL || scan->flags == EXACTFLU8) { + _CHECK_AND_WARN_PROBLEMATIC_LOCALE; + if (utf8_target ++ && nextchr >= 0 /* guard against negative EOS value in nextchr */ + && UTF8_IS_ABOVE_LATIN1(nextchr) + && scan->flags == EXACTL) + { +-- +2.9.4 + diff --git a/perl.spec b/perl.spec index 86e0ca8..bd8a6fc 100644 --- a/perl.spec +++ b/perl.spec @@ -335,6 +335,10 @@ Patch95: perl-5.24.1-sprintf-add-memory-wrap-tests.patch # in upstream after 5.27.0 Patch96: perl-5.24.1-perl-131085-Crash-with-sub-in-stash.patch +# Fix an improper cast of a negative integer to an unsigned 8-bit type, +# RT#131190, in upstream after 5.27.0 +Patch97: perl-5.27.0-Fix-131190-UTF8-code-improperly-casting-negative-int.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 @@ -3054,6 +3058,7 @@ Perl extension for Version Objects %patch94 -p1 %patch95 -p1 %patch96 -p1 +%patch97 -p1 %patch200 -p1 %patch201 -p1 @@ -3131,6 +3136,7 @@ perl -x patchlevel.h \ 'Fedora Patch93: Make File::Glob more resistant against degenerative matching (RT#131211)' \ 'Fedora Patch94: Fix a memory wrap in sv_vcatpvfn_flags() (RT#131260)' \ 'Fedora Patch96: Fix a crash when calling a subroutine from a stash (RT#131085)' \ + 'Fedora Patch97: Fix an improper cast of a negative integer to an unsigned 8-bit type (RT#131190)' \ '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} @@ -5413,6 +5419,7 @@ popd - Make File::Glob more resistant against degenerative matching (RT#131211) - Fix a memory wrap in sv_vcatpvfn_flags() (RT#131260) - Fix a crash when calling a subroutine from a stash (RT#131085) +- Fix an improper cast of a negative integer to an unsigned 8-bit type (RT#131190) * Wed Mar 08 2017 Petr Pisar <ppi...@redhat.com> - 4:5.24.1-385 - Fix a null-pointer dereference on malformed code (RT#130815) -- cgit v1.1 https://src.fedoraproject.org/cgit/perl.git/commit/?h=f25&id=a37f1593f4bc17311eae591905407c1cc9e561b7 _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org