1
0
Fork 0
forked from External/grumble

grumble: allow for other ciphers than OCB2-AES128.

This commit is contained in:
Mikkel Krautz 2012-12-08 23:50:32 +01:00
parent eacf839182
commit cd363d197e
3 changed files with 12 additions and 8 deletions

View file

@ -109,8 +109,8 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
}
plain_len := len(src) - cs.Overhead()
if len(dst) != plain_len {
return errors.New("cryptstate: plain_len and src len mismatch")
if len(dst) < plain_len {
return errors.New("cryptstate: not enough space in dst for plain text")
}
ivbyte := src[0]