From 274d3944a938a91b9e5360a9351f53c2d35eb82b 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 15:32:59 +0200
Subject: Fix handling backslashes in PATH environment variable when executing
 "perl -S"

---
 ...83-don-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 <t...@develop-help.com>
+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ř <ppi...@redhat.com>
+---
+ 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 904dade..139a426 100644
--- a/perl.spec
+++ b/perl.spec
@@ -263,6 +263,10 @@ Patch86:        
perl-5.27.0-perl-131526-don-t-go-beyond-the-end-of-the-NUL-in-my
 # in upstream after 5.25.4
 Patch87:        perl-5.22.3-Fix-checks-for-tainted-dir-in-ENV-PATH.patch
 
+# Fix handling backslashes in PATH environment variable when executing
+# "perl -S", RT#129183, in upstream after 5.27.0
+Patch88:        
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
 
@@ -2592,6 +2596,7 @@ Perl extension for Version Objects
 %patch85 -p1
 %patch86 -p1
 %patch87 -p1
+%patch88 -p1
 %patch200 -p1
 %patch201 -p1
 
@@ -2659,6 +2664,7 @@ perl -x patchlevel.h \
     'Fedora Patch85: Fix glob UTF-8 flag on a glob reassignment (RT#131263)' \
     'Fedora Patch86: Fix a buffer overflow in my_atof2() (RT#131526)' \
     'Fedora Patch87: Fix checks for tainted directory in $ENV{PATH} if a 
backslash escape presents' \
+    'Fedora Patch88: 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}
@@ -4920,6 +4926,8 @@ popd
 - Fix glob UTF-8 flag on a glob reassignment (RT#131263)
 - Fix a buffer overflow in my_atof2() (RT#131526)
 - Fix checks for tainted directory in $ENV{PATH} if a backslash escape presents
+- Fix handling backslashes in PATH environment variable when executing
+  "perl -S" (RT#129183)
 
 * Wed Mar 08 2017 Petr Pisar <ppi...@redhat.com> - 4:5.22.3-370
 - Fix a null-pointer dereference on malformed code (RT#130815)
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl.git/commit/?h=f24&id=274d3944a938a91b9e5360a9351f53c2d35eb82b
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to