mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
vboot2: Add verification for common vb2 struct header
All new-style structs have a common header. This adds a verification function for that common header, and tests for it. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I668486e77f7200c10b43aa2d17b4dd6639e5538e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225459 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
7c2beb0838
commit
f6cfb974ce
@@ -277,12 +277,16 @@ struct vb2_struct_common {
|
||||
uint16_t struct_version_major;
|
||||
uint16_t struct_version_minor;
|
||||
|
||||
/* Offset of null-terminated ASCII description from start of struct */
|
||||
/*
|
||||
* Offset of null-terminated ASCII description from start of struct.
|
||||
* Must be 0 if desc_size=0.
|
||||
*/
|
||||
uint32_t desc_offset;
|
||||
|
||||
/*
|
||||
* Size of description in bytes, counting null terminator. May be 0
|
||||
* if no description is present.
|
||||
* Size of description in bytes, counting null terminator. Set 0 if no
|
||||
* description is present. If non-zero, there must be a null
|
||||
* terminator (0) at offset (desc_offset + desc_size - 1).
|
||||
*/
|
||||
uint32_t desc_size;
|
||||
} __attribute__((packed));
|
||||
|
||||
Reference in New Issue
Block a user