summaryrefslogtreecommitdiff
path: root/futility/updater_utils.h
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@google.com>2022-08-08 11:12:38 -0400
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-17 14:30:49 +0000
commit73bc2a9a0af97915b351a1ced0d6d16a0c369559 (patch)
tree1f9bbc35ba6a698a46c2c330734e869cc08251da /futility/updater_utils.h
parentba30719672b5cbd5510e5dcf98937dbe387838f9 (diff)
downloadvboot-73bc2a9a0af97915b351a1ced0d6d16a0c369559.tar.gz
2misc: Abort before using GBB if gbb_offset is not initialized
In vb2_get_gbb, abort if gbb_offset is zero. This ensures that functions like vb2api_gbb_get_flags won't try to read garbage GBB data if the context hasn't been properly initialized. Some additional changes made to fix tests: 1. In vb2_set_boot_mode, don't access GBB unless needed. 2. In vb2api_get_dev_default_boot_target, use vb2api_gbb_get_flags instead of vb2_get_gbb to make it easier to mock. This is needed for depthcharge tests. 3. Make vb2api_get_debug_info tolerant of GBB not being set. This is needed for depthcharge tests. BUG=b:237093169 BRANCH=none TEST=make && make runtests Cq-Depend: chromium:3820402 Change-Id: I921d6cc4a5d91c8114c5e46748b4576a1e7716d0 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3817941 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'futility/updater_utils.h')
0 files changed, 0 insertions, 0 deletions