diff options
author | Marty E. Plummer <hanetzer@startmail.com> | 2019-10-25 18:18:39 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-04 11:56:04 +0000 |
commit | 20994a763bc02d099a282c7dc3098222c7f5fc4f (patch) | |
tree | 30249d487b6e70b0d1b9116d55ebbb8a653dfa93 /src/lib | |
parent | ce6f1a53e9561c7a7ba35e0f21b0ba9ffc356efa (diff) | |
download | coreboot-20994a763bc02d099a282c7dc3098222c7f5fc4f.tar.xz |
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 <hanetzer@startmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cbfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |