summaryrefslogtreecommitdiff
path: root/common/vboot_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/vboot_hash.c')
-rw-r--r--common/vboot_hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index e3bdf9e6fd..334b006281 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -211,8 +211,9 @@ static int vboot_hash_start(uint32_t offset, uint32_t size,
* Make sure request fits inside flash. That is, you can't use this
* command to peek at other memory.
*/
- if (offset > CONFIG_FLASH_SIZE || size > CONFIG_FLASH_SIZE ||
- offset + size > CONFIG_FLASH_SIZE || nonce_size < 0) {
+ if (offset > CONFIG_FLASH_SIZE_BYTES ||
+ size > CONFIG_FLASH_SIZE_BYTES ||
+ offset + size > CONFIG_FLASH_SIZE_BYTES || nonce_size < 0) {
return EC_ERROR_INVAL;
}