ignore contents of elements of "bad" pointer vectors

develop
Ben Lubar 2020-02-11 17:17:11 -06:00
parent 62af2952b7
commit 195b933c61
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 6 additions and 0 deletions

@ -676,6 +676,12 @@ void Checker::check_vector(const ToCheck & item, type_identity *item_identity, b
FAIL("vector capacity is non-integer (" << (ucapacity / item_size) << " items plus " << (ucapacity % item_size) << " bytes)"); FAIL("vector capacity is non-integer (" << (ucapacity / item_size) << " items plus " << (ucapacity % item_size) << " bytes)");
} }
if (item.path.back() == ".bad" && pointer)
{
// check pointers but don't check contents
item_identity = nullptr;
}
if (local_ok && check_access(item, reinterpret_cast<void *>(vector.start), item.identity, length) && item_identity) if (local_ok && check_access(item, reinterpret_cast<void *>(vector.start), item.identity, length) && item_identity)
{ {
auto ienum = static_cast<enum_identity *>(static_cast<container_identity *>(item.identity)->getIndexEnumType()); auto ienum = static_cast<enum_identity *>(static_cast<container_identity *>(item.identity)->getIndexEnumType());