From f1e2b8adbd84434a634b62a3dc0c0c7506a96ae2 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 14 Mar 2018 11:35:53 +0100 Subject: [PATCH] crypto/engine/eng_cryptodev.c: don't treat a void* like an array The void* needs to be cast to a char* first. Fixes #5614 Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/5615) --- crypto/engine/eng_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index 7aae5ab5fd..d8cac4bdfd 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -1057,7 +1057,7 @@ static int crparam2bn(struct crparam *crp, BIGNUM *a) return (-1); for (i = 0; i < bytes; i++) - pd[i] = crp->crp_p[bytes - i - 1]; + pd[i] = ((char *)crp->crp_p)[bytes - i - 1]; BN_bin2bn(pd, bytes, a); free(pd); -- 2.40.0