Explorar el Código

Use length of actual hash.

Gert Driesen hace 8 años
padre
commit
178512c998
Se han modificado 1 ficheros con 1 adiciones y 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);