Explorar o código

Use length of actual hash.

Gert Driesen %!s(int64=8) %!d(string=hai) anos
pai
achega
178512c998
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Renci.SshNet/Session.cs

+ 1 - 1
src/Renci.SshNet/Session.cs

@@ -882,7 +882,7 @@ namespace Renci.SshNet
                 }
                 else
                 {
-                    var data = new byte[packetLength + (_clientMac.HashSize/8)];
+                    var data = new byte[packetLength + hash.Length];
                     Buffer.BlockCopy(packetData, packetDataOffset, data, 0, packetLength);
                     Buffer.BlockCopy(hash, 0, data, packetLength, hash.Length);
                     SendPacket(data, 0, data.Length);