summaryrefslogtreecommitdiff
path: root/src/commonlib/bsd/cbfs_mcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonlib/bsd/cbfs_mcache.c')
-rw-r--r--src/commonlib/bsd/cbfs_mcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commonlib/bsd/cbfs_mcache.c b/src/commonlib/bsd/cbfs_mcache.c
index 0d5d8e0221..965f9faef6 100644
--- a/src/commonlib/bsd/cbfs_mcache.c
+++ b/src/commonlib/bsd/cbfs_mcache.c
@@ -118,7 +118,7 @@ cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *
current += ALIGN_UP(data_offset, CBFS_MCACHE_ALIGNMENT);
}
- ERROR("CBFS mcache overflow!\n");
+ ERROR("CBFS mcache is not terminated!\n"); /* should never happen */
return CB_ERR;
}
@@ -127,7 +127,7 @@ size_t cbfs_mcache_real_size(const void *mcache, size_t mcache_size)
const void *end = mcache + mcache_size;
const void *current = mcache;
- while (current + sizeof(uint32_t) < end) {
+ while (current + sizeof(uint32_t) <= end) {
const union mcache_entry *entry = current;
if (entry->magic == MCACHE_MAGIC_FULL || entry->magic == MCACHE_MAGIC_END) {