From 4b937ffd49cd8184840183646155fce18a50160c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 16 Jun 2017 15:32:59 +0200 Subject: [PATCH] Fix handling backslashes in PATH environment variable when executing "perl -S" --- ...n-t-treat-as-an-escape-in-PATH-for-S.patch | 32 +++++++++++++++++++ perl.spec | 8 +++++ 2 files changed, 40 insertions(+) create mode 100644 perl-5.27.0-perl-129183-don-t-treat-as-an-escape-in-PATH-for-S.patch diff --git a/perl-5.27.0-perl-129183-don-t-treat-as-an-escape-in-PATH-for-S.patch b/perl-5.27.0-perl-129183-don-t-treat-as-an-escape-in-PATH-for-S.patch new file mode 100644 index 0000000..8889451 --- /dev/null +++ b/perl-5.27.0-perl-129183-don-t-treat-as-an-escape-in-PATH-for-S.patch @@ -0,0 +1,32 @@ +From e80af1fd276d83858d27742ea887415e3263960b Mon Sep 17 00:00:00 2001 +From: Tony Cook +Date: Wed, 12 Oct 2016 10:42:47 +1100 +Subject: [PATCH] (perl 129183) don't treat \ as an escape in PATH for -S +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + util.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/util.c b/util.c +index 5bb0dfc..6bc2fe5 100644 +--- a/util.c ++++ b/util.c +@@ -3352,9 +3352,8 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, + if (len < sizeof tmpbuf) + tmpbuf[len] = '\0'; + # else +- s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf, s, bufend, +- ':', +- &len); ++ s = delimcpy_no_escape(tmpbuf, tmpbuf + sizeof tmpbuf, s, bufend, ++ ':', &len); + # endif + if (s < bufend) + s++; +-- +2.9.4 + diff --git a/perl.spec b/perl.spec index 0c7b954..4528650 100644 --- a/perl.spec +++ b/perl.spec @@ -161,6 +161,10 @@ Patch36: perl-5.26.0-perl-131263-clear-the-UTF8-flag-on-a-glob-if-it-isn- # Fix a buffer overflow in my_atof2(), RT#131526, in upstream after 5.27.0 Patch37: perl-5.27.0-perl-131526-don-t-go-beyond-the-end-of-the-NUL-in-my.patch +# Fix handling backslashes in PATH environment variable when executing +# "perl -S", RT#129183, in upstream after 5.27.0 +Patch38: perl-5.27.0-perl-129183-don-t-treat-as-an-escape-in-PATH-for-S.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 @@ -2816,6 +2820,7 @@ Perl extension for Version Objects %patch35 -p1 %patch36 -p1 %patch37 -p1 +%patch38 -p1 %patch200 -p1 %patch201 -p1 @@ -2842,6 +2847,7 @@ perl -x patchlevel.h \ 'Fedora Patch34: Fix cloning :via handles on thread creation (RT#131221)' \ 'Fedora Patch36: Fix glob UTF-8 flag on a glob reassignment (RT#131263)' \ 'Fedora Patch37: Fix a buffer overflow in my_atof2() (RT#131526)' \ + 'Fedora Patch38: Fix handling backslashes in PATH environment variable when executing "perl -S" (RT#129183)' \ '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} @@ -5131,6 +5137,8 @@ popd - Fix cloning :via handles on thread creation (RT#131221) - Fix glob UTF-8 flag on a glob reassignment (RT#131263) - Fix a buffer overflow in my_atof2() (RT#131526) +- Fix handling backslashes in PATH environment variable when executing + "perl -S" (RT#129183) * Tue Jun 06 2017 Jitka Plesnikova - 4:5.26.0-393 - Stop providing old perl(MODULE_COMPAT_5.24.*)