projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32cc392
)
lib: rsa: rsa-verify: also check that padding is not NULL
author
Philippe Reynes
<philippe.reynes@softathome.com>
Fri, 15 Oct 2021 09:28:47 +0000
(11:28 +0200)
committer
Tom Rini
<trini@konsulko.com>
Tue, 26 Oct 2021 19:26:45 +0000
(15:26 -0400)
This commit adds a check on the padding in the function rsa_verify_key
to avoid using a NULL pointer.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/rsa/rsa-verify.c
patch
|
blob
|
history
diff --git
a/lib/rsa/rsa-verify.c
b/lib/rsa/rsa-verify.c
index
600c93a
..
83f7564
100644
(file)
--- a/
lib/rsa/rsa-verify.c
+++ b/
lib/rsa/rsa-verify.c
@@
-340,7
+340,7
@@
static int rsa_verify_key(struct image_sign_info *info,
struct padding_algo *padding = info->padding;
int hash_len;
- if (!prop || !sig || !hash || !checksum)
+ if (!prop || !sig || !hash || !checksum
|| !padding
)
return -EIO;
if (sig_len != (prop->num_bits / 8)) {