aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2011-06-06 14:30:48 +1000
committerAndrew Gerrand <adg@golang.org>2011-06-06 14:30:48 +1000
commita028a02395175fc04aa694b0b3849348fefaa4ad (patch)
tree68dbff799349bc51778b2981f903f45a3b30d2a5
parentd01b260e7822fe46e809e1ab84bf6ff6db0cae18 (diff)
downloadgo-a028a02395175fc04aa694b0b3849348fefaa4ad.tar.gz
go-a028a02395175fc04aa694b0b3849348fefaa4ad.zip
crypto/twofish: fix Reset index overflow bug.
Fixes #1919. R=golang-dev, r CC=golang-dev https://golang.org/cl/4530110
-rw-r--r--src/pkg/crypto/twofish/twofish.go2
1 files changed, 1 insertions, 1 deletions
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
}
}