Skip to content

Commit

Permalink
ssh: fix copy and paste error
Browse files Browse the repository at this point in the history
Doesn't matter because contentKey and lengthKey are the same length,
but we should really be looping over lengthKey here.

Change-Id: Ic7af3c553eb4382239bec1c030e77c7f5baa0662
Reviewed-on: https://go-review.googlesource.com/109735
Run-TryBot: Michael Munday <mike.munday@ibm.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
mundaym authored and bradfitz committed May 1, 2018
1 parent 80f0338 commit 613d6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh/cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ func newChaCha20Cipher(key, unusedIV, unusedMACKey []byte, unusedAlgs directionA
for i := range c.contentKey {
c.contentKey[i] = binary.LittleEndian.Uint32(key[i*4 : (i+1)*4])
}
for i := range c.contentKey {
for i := range c.lengthKey {
c.lengthKey[i] = binary.LittleEndian.Uint32(key[(i+8)*4 : (i+9)*4])
}
return c, nil
Expand Down

0 comments on commit 613d6ea

Please sign in to comment.