From: Andrew Gerrand Date: Mon, 6 Jun 2011 04:30:48 +0000 (+1000) Subject: crypto/twofish: fix Reset index overflow bug. X-Git-Tag: weekly.2011-06-09~57 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a028a02395175fc04aa694b0b3849348fefaa4ad;p=gostls13.git crypto/twofish: fix Reset index overflow bug. Fixes #1919. R=golang-dev, r CC=golang-dev https://golang.org/cl/4530110 --- diff --git a/src/pkg/crypto/twofish/twofish.go b/src/pkg/crypto/twofish/twofish.go index 9303f03ffd..1a1aac9b99 100644 --- a/src/pkg/crypto/twofish/twofish.go +++ b/src/pkg/crypto/twofish/twofish.go @@ -116,7 +116,7 @@ func (c *Cipher) Reset() { c.k[i] = 0 } for i := range c.s { - for j := 0; j < 265; j++ { + for j := 0; j < 256; j++ { c.s[i][j] = 0 } }