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