projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b47e69
)
Made the assert in the verifier optional
author
Wouter van Oortmerssen
<wvo@google.com>
Tue, 12 Aug 2014 23:49:37 +0000
(16:49 -0700)
committer
Wouter van Oortmerssen
<wvo@google.com>
Wed, 13 Aug 2014 18:44:20 +0000
(11:44 -0700)
Change-Id: Ie6b0a8e137a0743bbf18531f29712cf5f11bf34f
Tested: on Linux
include/flatbuffers/flatbuffers.h
patch
|
blob
|
history
diff --git
a/include/flatbuffers/flatbuffers.h
b/include/flatbuffers/flatbuffers.h
index
d5f53bf
..
91dce85
100644
(file)
--- a/
include/flatbuffers/flatbuffers.h
+++ b/
include/flatbuffers/flatbuffers.h
@@
-676,7
+676,9
@@
class Verifier {
// Verify any range within the buffer.
bool Verify(const void *elem, size_t elem_len) const {
bool ok = elem >= buf_ && elem <= end_ - elem_len;
- assert(ok);
+ #ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
+ assert(ok);
+ #endif
return ok;
}