mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 06:40:01 +00:00
Made the assert in the verifier optional
Change-Id: Ie6b0a8e137a0743bbf18531f29712cf5f11bf34f Tested: on Linux
This commit is contained in:
@@ -676,7 +676,9 @@ class Verifier {
|
|||||||
// Verify any range within the buffer.
|
// Verify any range within the buffer.
|
||||||
bool Verify(const void *elem, size_t elem_len) const {
|
bool Verify(const void *elem, size_t elem_len) const {
|
||||||
bool ok = elem >= buf_ && elem <= end_ - elem_len;
|
bool ok = elem >= buf_ && elem <= end_ - elem_len;
|
||||||
assert(ok);
|
#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
|
||||||
|
assert(ok);
|
||||||
|
#endif
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user