mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-21 20:38:29 +00:00
Fixed Reflection Verifier not handling vectors of unions.
Change-Id: Ie94386ff8e10fd2a964bd9155139b50953746a37
This commit is contained in:
@@ -2109,6 +2109,11 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
||||
return VerifyAlignment<T>(elem) && Verify(elem, sizeof(T));
|
||||
}
|
||||
|
||||
bool VerifyFromPointer(const uint8_t *p, size_t len) {
|
||||
auto o = static_cast<size_t>(p - buf_);
|
||||
return Verify(o, len);
|
||||
}
|
||||
|
||||
// Verify relative to a known-good base pointer.
|
||||
bool Verify(const uint8_t *base, voffset_t elem_off, size_t elem_len) const {
|
||||
return Verify(static_cast<size_t>(base - buf_) + elem_off, elem_len);
|
||||
|
||||
Reference in New Issue
Block a user