mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
add verification that type_vec.size == vec.size() (#8853)
Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
@@ -156,6 +156,7 @@ static bool VerifyVector(flatbuffers::Verifier& v,
|
||||
auto type_vec = table.GetPointer<Vector<uint8_t>*>(vec_field.offset() -
|
||||
sizeof(voffset_t));
|
||||
if (!v.VerifyVector(type_vec)) return false;
|
||||
if (type_vec->size() != vec->size()) return false;
|
||||
for (uoffset_t j = 0; j < vec->size(); j++) {
|
||||
// get union type from the prev field
|
||||
auto utype = type_vec->Get(j);
|
||||
|
||||
Reference in New Issue
Block a user