summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2014-09-01 06:45:47 +0000
committerjasper <jasper@openbsd.org>2014-09-01 06:45:47 +0000
commitd5d7d10e68b1f828c7776f680f92b0d9c0a9b94f (patch)
treea6fdae9856b962b97e5e1c9095619f1a44d18f3e
parentMake this consistent with sys/kern/Makefile: require the 'syscalls' target (diff)
downloadwireguard-openbsd-d5d7d10e68b1f828c7776f680f92b0d9c0a9b94f.tar.xz
wireguard-openbsd-d5d7d10e68b1f828c7776f680f92b0d9c0a9b94f.zip
apply fix from upstream to remedy RT 37700, which hardens the close() function
ok millert@
-rw-r--r--gnu/usr.bin/perl/cpan/libnet/Net/FTP/dataconn.pm5
-rw-r--r--gnu/usr.bin/perl/patchlevel.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/cpan/libnet/Net/FTP/dataconn.pm b/gnu/usr.bin/perl/cpan/libnet/Net/FTP/dataconn.pm
index e7645cbd930..eeaf2719fc0 100644
--- a/gnu/usr.bin/perl/cpan/libnet/Net/FTP/dataconn.pm
+++ b/gnu/usr.bin/perl/cpan/libnet/Net/FTP/dataconn.pm
@@ -52,7 +52,8 @@ sub _close {
$data->SUPER::close();
delete ${*$ftp}{'net_ftp_dataconn'}
- if exists ${*$ftp}{'net_ftp_dataconn'}
+ if defined $ftp
+ && exists ${*$ftp}{'net_ftp_dataconn'}
&& $data == ${*$ftp}{'net_ftp_dataconn'};
}
@@ -69,6 +70,8 @@ sub close {
$data->_close;
+ return unless defined $ftp;
+
$ftp->response() == CMD_OK
&& $ftp->message =~ /unique file name:\s*(\S*)\s*\)/
&& (${*$ftp}{'net_ftp_unique'} = $1);
diff --git a/gnu/usr.bin/perl/patchlevel.h b/gnu/usr.bin/perl/patchlevel.h
index 9f85e9452ad..0e04a27c043 100644
--- a/gnu/usr.bin/perl/patchlevel.h
+++ b/gnu/usr.bin/perl/patchlevel.h
@@ -133,6 +133,7 @@ hunk.
# endif
static const char * const local_patches[] = {
NULL
+ ,"Fix for RT 37700"
#ifdef PERL_GIT_UNCOMMITTED_CHANGES
,"uncommitted-changes"
#endif