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>
This commit is contained in:
Marty E. Plummer 2019-10-25 18:18:39 -05:00 committed by Patrick Georgi
parent ce6f1a53e9
commit 20994a763b
1 changed files with 1 additions and 1 deletions

View File

@ -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;