diff options
author | Andy Polyakov <appro@openssl.org> | 2010-04-14 07:47:28 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2010-04-14 07:47:28 +0000 |
commit | 6a1823b371129848fa402d19a2cae6a1adf1d874 (patch) | |
tree | f4ef4eabac5fad4fad1ae85ae9572a1fee64ae8e /crypto/modes/ofb128.c | |
parent | 45106caab7bcfea84734ff5c0ff5d0acd6363c68 (diff) |
[co]fb128.c: fix "n=0" bug.
Diffstat (limited to 'crypto/modes/ofb128.c')
-rw-r--r-- | crypto/modes/ofb128.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/modes/ofb128.c b/crypto/modes/ofb128.c index 09b3430034..c732e2ec58 100644 --- a/crypto/modes/ofb128.c +++ b/crypto/modes/ofb128.c @@ -95,14 +95,14 @@ void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, #endif while (len>=16) { (*block)(ivec, ivec, key); - for (n=0; n<16; n+=sizeof(size_t)) + for (; n<16; n+=sizeof(size_t)) *(size_t*)(out+n) = *(size_t*)(in+n) ^ *(size_t*)(ivec+n); len -= 16; out += 16; in += 16; + n = 0; } - n = 0; if (len) { (*block)(ivec, ivec, key); while (len--) { |