lib/rsa: correct check after allocation in fdt_add_bignum()
PATCH 1/1 lib/rsa: correct check after allocation in fdt_add_bignum()
After allocating to pointer ctx we should check that pointer and not another pointer already checked above.
Signed-off-by Heinrich Schuchardt <[email protected]>
--- lib/rsa/rsa-sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rsa/rsa-sign.c +1 -1
@@ -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
PATCH 1/1 lib/rsa: correct check after allocation in fdt_add_bignum()
Quoted 8 lines · Heinrich Schuchardt
After allocating to pointer ctx we should check that pointer and not another pointer already checked above.
Signed-off-by Heinrich Schuchardt <[email protected]>--- lib/rsa/rsa-sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Simon Glass <[email protected]>
PATCH 1/1 lib/rsa: correct check after allocation in fdt_add_bignum()
In reply to Heinrich SchuchardtQuoted 5 lines · Heinrich Schuchardt
After allocating to pointer ctx we should check that pointer and not another pointer already checked above.
Signed-off-by Heinrich Schuchardt <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>