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:
committed by
Yu Watanabe
parent
f9a9b6b4f5
commit
4368db3219
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user