From a02526e5e0e17f6d15438a773e9cd3d930fb5048 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 5 Jul 2021 08:33:42 -0500 Subject: [PATCH] SFTP: return false if get_channel_packet returns false --- phpseclib/Net/SFTP.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 74a29739..ef74dcae 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -3169,6 +3169,9 @@ class Net_SFTP extends Net_SSH2 $this->packet_buffer = ''; return false; } + if ($temp === false) { + return false; + } $this->packet_buffer.= $temp; } if (strlen($this->packet_buffer) < 4) {