* [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum()
@ 2020-08-20 19:11 Heinrich Schuchardt
2020-08-22 15:09 ` Simon Glass
2020-08-28 12:53 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-08-20 19:11 UTC (permalink / raw)
To: u-boot
After allocating to pointer ctx we should check that pointer and not
another pointer already checked above.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/rsa/rsa-sign.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 40ca1e1f57..1f0d81bd7a 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -708,7 +708,7 @@ static int fdt_add_bignum(void *blob, int noffset, const char *prop_name,
return -ENOMEM;
}
ctx = BN_CTX_new();
- if (!tmp) {
+ if (!ctx) {
fprintf(stderr, "Out of memory (bignum context)\n");
return -ENOMEM;
}
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum()
2020-08-20 19:11 [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum() Heinrich Schuchardt
@ 2020-08-22 15:09 ` Simon Glass
2020-08-28 12:53 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-08-22 15:09 UTC (permalink / raw)
To: u-boot
On Thu, 20 Aug 2020 at 13:11, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> After allocating to pointer ctx we should check that pointer and not
> another pointer already checked above.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/rsa/rsa-sign.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum()
2020-08-20 19:11 [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum() Heinrich Schuchardt
2020-08-22 15:09 ` Simon Glass
@ 2020-08-28 12:53 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-08-28 12:53 UTC (permalink / raw)
To: u-boot
On Thu, Aug 20, 2020 at 09:11:17PM +0200, Heinrich Schuchardt wrote:
> After allocating to pointer ctx we should check that pointer and not
> another pointer already checked above.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200828/e789e151/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-28 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 19:11 [PATCH 1/1] lib/rsa: correct check after allocation in fdt_add_bignum() Heinrich Schuchardt
2020-08-22 15:09 ` Simon Glass
2020-08-28 12:53 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.