mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
efi_loader: efi_variable_parse_signature() returns NULL on error
efi_variable_parse_signature() returns NULL on error, so IS_ERR() is an incorrect check. The goto err leads to pkcs7_free_message(), which works fine on a NULL ptr. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
42a426e027
commit
9ad15227bb
@@ -524,9 +524,8 @@ static efi_status_t efi_variable_authenticate(u16 *variable,
|
|||||||
var_sig = efi_variable_parse_signature(auth->auth_info.cert_data,
|
var_sig = efi_variable_parse_signature(auth->auth_info.cert_data,
|
||||||
auth->auth_info.hdr.dwLength
|
auth->auth_info.hdr.dwLength
|
||||||
- sizeof(auth->auth_info));
|
- sizeof(auth->auth_info));
|
||||||
if (IS_ERR(var_sig)) {
|
if (!var_sig) {
|
||||||
debug("Parsing variable's signature failed\n");
|
debug("Parsing variable's signature failed\n");
|
||||||
var_sig = NULL;
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user