diff options
Diffstat (limited to 'lib/avb/libavb/avb_descriptor.c')
-rw-r--r-- | lib/avb/libavb/avb_descriptor.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/avb/libavb/avb_descriptor.c b/lib/avb/libavb/avb_descriptor.c index 4f8e925..db465aa 100644 --- a/lib/avb/libavb/avb_descriptor.c +++ b/lib/avb/libavb/avb_descriptor.c @@ -38,8 +38,7 @@ bool avb_descriptor_validate_and_byteswap(const AvbDescriptor* src, return true; } -bool avb_descriptor_foreach(const uint8_t* image_data, - size_t image_size, +bool avb_descriptor_foreach(const uint8_t* image_data, size_t image_size, AvbDescriptorForeachFunc foreach_func, void* user_data) { const AvbVBMetaImageHeader* header = NULL; @@ -71,7 +70,7 @@ bool avb_descriptor_foreach(const uint8_t* image_data, } /* Careful, not byteswapped - also ensure it's aligned properly. */ - avb_assert_aligned(image_data); + avb_assert_word_aligned(image_data); header = (const AvbVBMetaImageHeader*)image_data; image_end = image_data + image_size; @@ -89,7 +88,7 @@ bool avb_descriptor_foreach(const uint8_t* image_data, for (p = desc_start; p < desc_end;) { const AvbDescriptor* dh = (const AvbDescriptor*)p; - avb_assert_aligned(dh); + avb_assert_word_aligned(dh); uint64_t nb_following = avb_be64toh(dh->num_bytes_following); uint64_t nb_total = sizeof(AvbDescriptor) + nb_following; @@ -140,8 +139,8 @@ const AvbDescriptor** avb_descriptor_get_all(const uint8_t* image_data, size_t num_descriptors = 0; SetDescriptorData data; - avb_descriptor_foreach( - image_data, image_size, count_descriptors, &num_descriptors); + avb_descriptor_foreach(image_data, image_size, count_descriptors, + &num_descriptors); data.descriptor_number = 0; data.descriptors = |