Index: firmware/lib/vboot_common.c |
diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c |
index d9838c41fcca8c2a0061fa3d55d6ce5d312e1bd6..a20e16fb0a808a1ddc267d0b63c7ac27cc3cf838 100644 |
--- a/firmware/lib/vboot_common.c |
+++ b/firmware/lib/vboot_common.c |
@@ -333,15 +333,15 @@ int VerifyFirmwarePreamble(const VbFirmwarePreambleHeader* preamble, |
return VBOOT_PREAMBLE_INVALID; |
} |
- /* Verify body signature is inside the block */ |
- if (VerifySignatureInside(preamble, preamble->preamble_size, |
+ /* Verify body signature is inside the signed data */ |
+ if (VerifySignatureInside(preamble, sig->data_size, |
&preamble->body_signature)) { |
VBDEBUG(("Firmware body signature off end of preamble\n")); |
return VBOOT_PREAMBLE_INVALID; |
} |
- /* Verify kernel subkey is inside the block */ |
- if (VerifyPublicKeyInside(preamble, preamble->preamble_size, |
+ /* Verify kernel subkey is inside the signed data */ |
+ if (VerifyPublicKeyInside(preamble, sig->data_size, |
&preamble->kernel_subkey)) { |
VBDEBUG(("Kernel subkey off end of preamble\n")); |
return VBOOT_PREAMBLE_INVALID; |
@@ -387,8 +387,8 @@ int VerifyKernelPreamble(const VbKernelPreambleHeader* preamble, |
return VBOOT_PREAMBLE_INVALID; |
} |
- /* Verify body signature is inside the block */ |
- if (VerifySignatureInside(preamble, preamble->preamble_size, |
+ /* Verify body signature is inside the signed data */ |
+ if (VerifySignatureInside(preamble, sig->data_size, |
&preamble->body_signature)) { |
VBDEBUG(("Kernel body signature off end of preamble\n")); |
return VBOOT_PREAMBLE_INVALID; |