1
0
mirror of https://github.com/golang/go synced 2024-11-19 14:54:43 -07:00

crypto/twofish: fix Reset index overflow bug.

Fixes #1919.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4530110
This commit is contained in:
Andrew Gerrand 2011-06-06 14:30:48 +10:00
parent d01b260e78
commit a028a02395

View File

@ -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
}
}