diff options
Diffstat (limited to 'crypto/modes')
-rw-r--r-- | crypto/modes/cbc128.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/modes/cbc128.c b/crypto/modes/cbc128.c index 4595b0f502..78949c1ed7 100644 --- a/crypto/modes/cbc128.c +++ b/crypto/modes/cbc128.c @@ -115,7 +115,8 @@ void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, out += 16; } } - memcpy(ivec, iv, 16); + if (ivec != iv) + memcpy(ivec, iv, 16); } else { if (STRICT_ALIGNMENT && ((size_t)in | (size_t)out | (size_t)ivec) % sizeof(size_t) != 0) { |