From: Richard Levitte Date: Wed, 14 Mar 2018 10:35:53 +0000 (+0100) Subject: crypto/engine/eng_cryptodev.c: don't treat a void* like an array X-Git-Tag: OpenSSL_1_0_2o~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f1e2b8adbd84434a634b62a3dc0c0c7506a96ae2;p=oweals%2Fopenssl.git 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) --- 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);