diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/lib/vboot_firmware.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/lib/vboot_firmware.c b/firmware/lib/vboot_firmware.c index a59b238e..8fa4c538 100644 --- a/firmware/lib/vboot_firmware.c +++ b/firmware/lib/vboot_firmware.c @@ -45,11 +45,14 @@ int LoadFirmware(LoadFirmwareParams* params) { /* Clear output params in case we fail */ params->firmware_index = 0; - params->kernel_sign_key_blob = NULL; - params->kernel_sign_key_size = 0; debug("LoadFirmware started...\n"); + if (params->kernel_sign_key_size < sizeof(VbPublicKey)) { + debug("Kernel sign key buffer too small\n"); + return LOAD_FIRMWARE_RECOVERY; + } + /* Must have a root key */ if (!root_key) { debug("No root key\n"); |