boot: cover BCD offsets past the buffer

Add a zero-length test for offset > max so the first bounds guard
is covered separately from the length overflow check.

Follow-up: 231857cfe8
This commit is contained in:
dongshengyuan
2026-07-19 20:21:47 +09:00
committed by Yu Watanabe
parent f9a9b6b4f5
commit 4368db3219
+1
View File
@@ -96,6 +96,7 @@ TEST(offset_bounds) {
assert_se(!BAD_ARRAY(Key, key_name, 0, 0, sizeof(Key)));
assert_se(bad_offset(0, sizeof(Key) + 1, sizeof(Key)));
assert_se(bad_offset(sizeof(Key) + 1, 0, sizeof(Key)));
assert_se(bad_offset(UINT32_MAX, 2, UINT32_MAX));
}