mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 22:03:40 +00:00
read vtable size through ReadScalar() (#5636)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
136d75fa65
commit
bcf1bd5c9e
@@ -1364,7 +1364,7 @@ class FlatBufferBuilder {
|
||||
it += sizeof(uoffset_t)) {
|
||||
auto vt_offset_ptr = reinterpret_cast<uoffset_t *>(it);
|
||||
auto vt2 = reinterpret_cast<voffset_t *>(buf_.data_at(*vt_offset_ptr));
|
||||
auto vt2_size = *vt2;
|
||||
auto vt2_size = ReadScalar<voffset_t>(vt2);
|
||||
if (vt1_size != vt2_size || 0 != memcmp(vt2, vt1, vt1_size)) continue;
|
||||
vt_use = *vt_offset_ptr;
|
||||
buf_.pop(GetSize() - vtableoffsetloc);
|
||||
|
||||
Reference in New Issue
Block a user