diff options
-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 c85e37c6a5..4595b0f502 100644 --- a/crypto/modes/cbc128.c +++ b/crypto/modes/cbc128.c @@ -69,7 +69,8 @@ void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, in += 16; out += 16; } - memcpy(ivec, iv, 16); + if (ivec != iv) + memcpy(ivec, iv, 16); } void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, |