Hi, Ben,
On 02/22/2018 07:16 PM, C0deAi wrote:
Hi my name is Benjamin Bales.
I am the founder and creator of CodeAI,
the first non-human contributor to your software project. CodeAI finds
and fixes security defects for you. It fixed 327. It wants to merge a
fix for a useless assignment. To view all 327 fixed issues from the
run claim your free open source account at mycode.ai and the
Dockerfile used to build and run your project in CodeAI, here-
https://drive.google.com/drive/folders/1KB9WQQyWQgYccmiSjy2E1JWJ4vWuoLYd
.
It is always free for open source projects.
If you have any questions about these results or have general
inquiries about CodeAI, please send an email to techsupport@xxxxxxxxx
Signed-off-by: Benjamin Bales <techsupport@xxxxxxxxx>
---
crypto/rsa.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/crypto/rsa.c b/crypto/rsa.c
index b067f3a..4167980 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -215,7 +215,6 @@ static int rsa_verify(struct akcipher_request *req)
goto err_free_m;
}
- ret = -ENOMEM;
s = mpi_read_raw_from_sgl(req->src, req->src_len);
if (!s) {
ret = -ENOMEM;
ret is also initialized at declaration, we can remove the assignment to
zero too. This applies to rsa_enc/dec/sign/verify. Also, I think it's
better to benefit of the power of undefined values and set the err/ret
in every branch (see https://rusty.ozlabs.org/?p=232).
Take care,
ta