summaryrefslogtreecommitdiffstats
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 f54b6631afd5..d2f969dbc32f 100644
--- a/src/commonlib/bsd/cbfs_mcache.c
+++ b/src/commonlib/bsd/cbfs_mcache.c
@@ -106,8 +106,8 @@ cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *
assert(entry->magic == MCACHE_MAGIC_FILE);
const uint32_t data_offset = be32toh(entry->file.h.offset);
const uint32_t data_length = be32toh(entry->file.h.len);
- if (namesize <= data_offset - offsetof(union cbfs_mdata, filename) &&
- memcmp(name, entry->file.filename, namesize) == 0) {
+ if (namesize <= data_offset - offsetof(union cbfs_mdata, h.filename) &&
+ memcmp(name, entry->file.h.filename, namesize) == 0) {
LOG("Found '%s' @%#x size %#x in mcache @%p\n",
name, entry->offset, data_length, current);
*data_offset_out = entry->offset + data_offset;