From be896dc88a7f4837c3907cd18c5cbf38d9bbfe4a Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Tue, 21 Jun 2011 20:14:54 +0000 Subject: [PATCH] Fix Buffer.BlockCopy error in SftpFileStream.Write method --- Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs b/Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs index 60a43bea..5afe29bd 100644 --- a/Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs +++ b/Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs @@ -864,7 +864,7 @@ namespace Renci.SshNet.Sftp // Yes: write the data directly to the file. var data = new byte[tempLen]; - Buffer.BlockCopy(this._buffer, offset, data, 0, tempLen); + Buffer.BlockCopy(buffer, offset, data, 0, tempLen); this._session.Write(this._handle, (ulong)this.Position, data); }