MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / Verify

Function Verify

native/thirdpart/flatbuffers/flatbuffers.h:2298–2307  ·  view source on GitHub ↗

Verify any range within the buffer.

Source from the content-addressed store, hash-verified

2296
2297 // Verify any range within the buffer.
2298 bool Verify(size_t elem, size_t elem_len) const {
2299 // clang-format off
2300 #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
2301 auto upper_bound = elem + elem_len;
2302 if (upper_bound_ < upper_bound)
2303 upper_bound_ = upper_bound;
2304 #endif
2305 // clang-format on
2306 return Check(elem_len < size_ && elem <= size_ - elem_len);
2307 }
2308
2309 template<typename T> bool VerifyAlignment(size_t elem) const {
2310 return Check((elem & (sizeof(T) - 1)) == 0 || !check_alignment_);

Callers 5

VerifyFromPointerFunction · 0.70
VerifyStringFunction · 0.70
VerifyVectorOrStringFunction · 0.70
VerifyTableStartFunction · 0.70
VerifyOffsetFunction · 0.70

Calls 1

CheckFunction · 0.85

Tested by

no test coverage detected