From f5fac71459234b4e44fe8ff386b19627e88ad680 Mon Sep 17 00:00:00 2001 From: Weili Qian Date: Wed, 22 Dec 2021 06:39:46 +0000 Subject: [PATCH 05/18] rsa: fix coverity warning Parameter: 'n' in the function 'get_prime_once' has not been changed, it should be defined as 'const'. Signed-off-by: Weili Qian --- src/uadk_rsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uadk_rsa.c b/src/uadk_rsa.c index 1e1e226..cb98159 100644 --- a/src/uadk_rsa.c +++ b/src/uadk_rsa.c @@ -307,10 +307,10 @@ static int check_prime_useful(const int *n, BIGNUM *prime, BIGNUM *r1, BIGNUM *r return GET_ERR_FINISH; } -static int get_prime_once(int num, const int *bitsr, int *n, BIGNUM *prime, - BIGNUM *rsa_p, BIGNUM *rsa_q, BIGNUM *r1, - BIGNUM *r2, BIGNUM *e_pub, BN_CTX *ctx, - BN_GENCB *cb) +static int get_prime_once(int num, const int *bitsr, const int *n, + BIGNUM *prime, BIGNUM *rsa_p, BIGNUM *rsa_q, + BIGNUM *r1, BIGNUM *r2, BIGNUM *e_pub, + BN_CTX *ctx, BN_GENCB *cb) { int ret = -1; -- 2.24.4