From 1a6038ddc19a94ddaa2dff9a3fd96f02640873e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 9 Jan 2018 15:46:05 +0100 Subject: [PATCH] Fix deparsing of transliterations with unprintable characters --- ...-transliterations-with-unprintable-c.patch | 48 +++++++++++++++++++ perl.spec | 7 +++ 2 files changed, 55 insertions(+) create mode 100644 perl-5.26.1-Fix-deparsing-of-transliterations-with-unprintable-c.patch diff --git a/perl-5.26.1-Fix-deparsing-of-transliterations-with-unprintable-c.patch b/perl-5.26.1-Fix-deparsing-of-transliterations-with-unprintable-c.patch new file mode 100644 index 0000000..f8c700e --- /dev/null +++ b/perl-5.26.1-Fix-deparsing-of-transliterations-with-unprintable-c.patch @@ -0,0 +1,48 @@ +From abd17348111a99642da217c45d836f2df5713594 Mon Sep 17 00:00:00 2001 +From: John Lightsey +Date: Tue, 31 Oct 2017 18:12:26 -0500 +Subject: [PATCH] Fix deparsing of transliterations with unprintable + characters. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RT #132405 + +Signed-off-by: Nicolas R +Petr Písař: Port to 5.26.1. +Signed-off-by: Petr Písař +--- + lib/B/Deparse.pm | 2 +- + lib/B/Deparse.t | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm +index 3166415..cc74552 100644 +--- a/lib/B/Deparse.pm ++++ b/lib/B/Deparse.pm +@@ -5200,7 +5200,7 @@ sub pchr { # ASCII + } elsif ($n == ord "\r") { + return '\\r'; + } elsif ($n >= ord("\cA") and $n <= ord("\cZ")) { +- return '\\c' . unctrl{chr $n}; ++ return '\\c' . $unctrl{chr $n}; + } else { + # return '\x' . sprintf("%02x", $n); + return '\\' . sprintf("%03o", $n); +diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t +index 7eeb4f8..eae9c49 100644 +--- a/lib/B/Deparse.t ++++ b/lib/B/Deparse.t +@@ -2610,3 +2610,8 @@ sub ($a, $=) { + $a; + } + ; ++#### ++# tr with unprintable characters ++my $str; ++$str = 'foo'; ++$str =~ tr/\cA//; +-- +2.13.6 + diff --git a/perl.spec b/perl.spec index bfd46d2..18d0393 100644 --- a/perl.spec +++ b/perl.spec @@ -225,6 +225,10 @@ Patch66: perl-5.26.1-perl-131895-fail-stat-on-names-with-0-embedded.patch # Fix a crash when untying an object witout a stash, in upstream after 5.27.5 Patch67: perl-5.27.5-Avoid-a-segfault-when-untying-an-object.patch +# Fix deparsing of transliterations with unprintable characters, RT#132405, +# in upstream after 5.27.5 +Patch68: perl-5.26.1-Fix-deparsing-of-transliterations-with-unprintable-c.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 @@ -2807,6 +2811,7 @@ Perl extension for Version Objects %patch65 -p1 %patch66 -p1 %patch67 -p1 +%patch68 -p1 %patch200 -p1 %patch201 -p1 @@ -2848,6 +2853,7 @@ perl -x patchlevel.h \ 'Fedora Patch65: Fix walking symbol table for ISA in Carp' \ 'Fedora Patch66: Fix handling file names with null bytes in stat and lstat functions (RT#131895)' \ 'Fedora Patch67: Fix a crash when untying an object witout a stash' \ + 'Fedora Patch68: Fix deparsing of transliterations with unprintable characters (RT#132405)' \ '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} @@ -5142,6 +5148,7 @@ popd - Fix handling file names with null bytes in stat and lstat functions (RT#131895) - Fix a crash when untying an object witout a stash +- Fix deparsing of transliterations with unprintable characters (RT#132405) * Mon Sep 25 2017 Jitka Plesnikova - 4:5.26.1-401 - Update perl(:MODULE_COMPAT)