diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2019-02-14 11:19:07 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-04-23 10:23:56 +0000 |
commit | e28fa4049d6a9c584bdf499fbaee2ee459b40118 (patch) | |
tree | 3882cc6e87b8ebd5609a0bb8e5fbba77abfc718e /util/cbfstool | |
parent | 19fcc89fe085fad2e7aba52375b4190463667fdb (diff) |
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>
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/cbfs_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 6ccc4f904e..5ff81309f4 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -1844,7 +1844,7 @@ struct cbfs_file_attribute *cbfs_file_next_attr(struct cbfs_file *file, /* 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; |