0e6766
From 7c8b0c1259db2bdd372cc1bdb63bf5b89a969a4a Mon Sep 17 00:00:00 2001
0e6766
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
0e6766
Date: Tue, 27 Oct 2015 16:33:43 +0100
0e6766
Subject: [PATCH] Fix incorrect handling of CRLF in Net::FTP
0e6766
MIME-Version: 1.0
0e6766
Content-Type: text/plain; charset=UTF-8
0e6766
Content-Transfer-Encoding: 8bit
0e6766
0e6766
libnet upstream commit ported to perl-5.16.3:
0e6766
0e6766
From 24eb8619451c3d8529d903d9133d03a7f447488f Mon Sep 17 00:00:00 2001
0e6766
From: Steve Hay <steve.m.hay@googlemail.com>
0e6766
Date: Fri, 3 Jan 2014 17:41:55 +0000
0e6766
Subject: [PATCH] Fix incorrect handling of CRLF in Net::FTP
0e6766
0e6766
Signed-off-by: Petr Písař <ppisar@redhat.com>
0e6766
---
0e6766
 cpan/libnet/Net/FTP/A.pm | 4 ++--
0e6766
 1 file changed, 2 insertions(+), 2 deletions(-)
0e6766
0e6766
diff --git a/cpan/libnet/Net/FTP/A.pm b/cpan/libnet/Net/FTP/A.pm
0e6766
index 427d02b..886d252 100644
0e6766
--- a/cpan/libnet/Net/FTP/A.pm
0e6766
+++ b/cpan/libnet/Net/FTP/A.pm
0e6766
@@ -77,8 +77,8 @@ sub write {
0e6766
   my $timeout = @_ ? shift: $data->timeout;
0e6766
 
0e6766
   my $nr = (my $tmp = substr($buf, 0, $size)) =~ tr/\r\n/\015\012/;
0e6766
-  $tmp =~ s/([^\015])\012/$1\015\012/sg if $nr;
0e6766
-  $tmp =~ s/^\012/\015\012/ unless ${*$data}{'net_ftp_outcr'};
0e6766
+  $tmp =~ s/(?
0e6766
+  $tmp =~ s/^\015// if ${*$data}{'net_ftp_outcr'};
0e6766
   ${*$data}{'net_ftp_outcr'} = substr($tmp, -1) eq "\015";
0e6766
 
0e6766
   # If the remote server has closed the connection we will be signal'd
0e6766
-- 
0e6766
2.4.3
0e6766