Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31494 )
Change subject: cbfstool: Fix cbfs_file_next_attr ......................................................................
cbfstool: Fix cbfs_file_next_attr
The last attribute was never returned. Fix size compare to retrieve all attributes.
Manually tested and seen all attributes, including the last one.
Change-Id: I08df073158a0f285f96048c92aa8066fa4f57e6f Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/31494 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org Reviewed-by: Furquan Shaikh furquan@google.com --- M util/cbfstool/cbfs_image.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Julius Werner: Looks good to me, approved
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 6ccc4f9..5ff8130 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -1844,7 +1844,7 @@
/* Is there enough space for another attribute? */ if ((uint8_t *)attr + ntohl(attr->len) + - sizeof(struct cbfs_file_attribute) >= + sizeof(struct cbfs_file_attribute) > (uint8_t *)file + ntohl(file->offset)) return NULL;