From 20994a763bc02d099a282c7dc3098222c7f5fc4f Mon Sep 17 00:00:00 2001 From: "Marty E. Plummer" Date: Fri, 25 Oct 2019 18:18:39 -0500 Subject: cbfs: read header offset as explicitly LE le32_to_cpu spits out uint32_t on BE targets, cast it. Change-Id: Idc99b0c133faa2aa15d06f998e7371d332ffa490 Signed-off-by: Marty E. Plummer Reviewed-on: https://review.coreboot.org/c/coreboot/+/36346 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/lib/cbfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 1e8a93f6e0..9ac1bc084b 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -302,7 +302,7 @@ static int cbfs_master_header_props(struct cbfs_props *props) if (rdev_readat(bdev, &rel_offset, offset, sizeof(int32_t)) < 0) return -1; - offset = fmap_top + rel_offset; + offset = fmap_top + (int32_t)le32_to_cpu(rel_offset); if (rdev_readat(bdev, &header, offset, sizeof(header)) < 0) return -1; -- cgit v1.2.3