Fix engine cryptodev: pointer to IV
authorKirill Marinushkin <k.marinushkin@gmail.com>
Thu, 5 May 2016 18:51:07 +0000 (20:51 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 14 May 2016 09:29:09 +0000 (11:29 +0200)
Currently point to wrong address

Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/engine/eng_cryptodev.c

index 195912348c9cd3d11bbfda8980c2d9acf002ffb3..bb7f59e025a8292e417398b9047affbb6f43e38f 100644 (file)
@@ -446,7 +446,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
     cryp.op = EVP_CIPHER_CTX_encrypting(ctx) ? COP_ENCRYPT : COP_DECRYPT;
 
     if (EVP_CIPHER_CTX_iv_length(ctx) > 0) {
-        cryp.iv = *(caddr_t*) EVP_CIPHER_CTX_iv(ctx);
+        cryp.iv = (caddr_t) EVP_CIPHER_CTX_iv(ctx);
         if (!EVP_CIPHER_CTX_encrypting(ctx)) {
             iiv = in + inl - EVP_CIPHER_CTX_iv_length(ctx);
             memcpy(save_iv, iiv, EVP_CIPHER_CTX_iv_length(ctx));