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