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:
parent
ce6f1a53e9
commit
20994a763b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue