From 2c99863001cbb39838d983d76171ac131930c310 Mon Sep 17 00:00:00 2001 From: Weili Qian Date: Thu, 3 Mar 2022 03:25:03 +0000 Subject: [PATCH 31/31] rsa: fixup about the wrong copy The pointer of 'req.src' is NULL, and the direct memcpy operation will fail. Therefore, delete the memcpy and assign a value directly later. Signed-off-by: Weili Qian Signed-off-by: Zhiqi Song --- src/uadk_rsa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/uadk_rsa.c b/src/uadk_rsa.c index c5d4dbb..1488b98 100644 --- a/src/uadk_rsa.c +++ b/src/uadk_rsa.c @@ -902,7 +902,6 @@ static int rsa_fill_pubkey(struct rsa_pubkey_param *pubkey_param, if (!rsa_sess->is_pubkey_ready) { wd_rsa_get_pubkey(rsa_sess->sess, &pubkey); wd_rsa_get_pubkey_params(pubkey, &wd_e, &wd_n); - memcpy(rsa_sess->req.src, in_buf, rsa_sess->req.src_bytes); wd_e->dsize = BN_bn2bin(pubkey_param->e, (unsigned char *)wd_e->data); wd_n->dsize = BN_bn2bin(pubkey_param->n, -- 2.24.4