projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4431a98
)
lib/rsa: correct check after allocation in fdt_add_bignum()
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Thu, 20 Aug 2020 19:11:17 +0000
(21:11 +0200)
committer
Tom Rini
<trini@konsulko.com>
Thu, 27 Aug 2020 15:26:58 +0000
(11:26 -0400)
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>
lib/rsa/rsa-sign.c
patch
|
blob
|
history
diff --git
a/lib/rsa/rsa-sign.c
b/lib/rsa/rsa-sign.c
index
40ca1e1
..
1f0d81b
100644
(file)
--- 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;
}