diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index eb8a5da4..67524136 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -3108,6 +3108,9 @@ class SFTP extends SSH2 $this->packet_buffer = ''; return false; } + if ($temp === false) { + return false; + } $this->packet_buffer.= $temp; } if (strlen($this->packet_buffer) < 4) {