mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
lib: rsa: rsa-verify: also check that padding is not NULL
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>
This commit is contained in:
parent
32cc3929a1
commit
b560c704d6
@ -340,7 +340,7 @@ static int rsa_verify_key(struct image_sign_info *info,
|
|||||||
struct padding_algo *padding = info->padding;
|
struct padding_algo *padding = info->padding;
|
||||||
int hash_len;
|
int hash_len;
|
||||||
|
|
||||||
if (!prop || !sig || !hash || !checksum)
|
if (!prop || !sig || !hash || !checksum || !padding)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
if (sig_len != (prop->num_bits / 8)) {
|
if (sig_len != (prop->num_bits / 8)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user