uadk_engine/0031-rsa-fixup-about-the-wrong-copy.patch
Wenkai Lin 2bf32ce015 engine: update uadk engine source
Backport uadk engine patch(24-32) from linaro.

Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
(cherry picked from commit 9a48324e3f545ee8f8485847f3fecf252682eb6a)
2022-03-08 20:00:26 +08:00

31 lines
1.0 KiB
Diff

From 2c99863001cbb39838d983d76171ac131930c310 Mon Sep 17 00:00:00 2001
From: Weili Qian <qianweili@huawei.com>
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 <qianweili@huawei.com>
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
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