Bump up default max tables for flatbuffer verifier
We had already bumped this number up to 3000000 in one spot, but not in
all of them.
Additionally, add comments to call out that these max sizes may be a
cause of the verifier failing.
Change-Id: I890b541408bc514dbb5ad2c140920429686fa55e
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/flatbuffers.h b/aos/flatbuffers.h
index a299fe9..607303c 100644
--- a/aos/flatbuffers.h
+++ b/aos/flatbuffers.h
@@ -118,6 +118,11 @@
// make attempts to use it fail more obviously.
void Wipe() { memset(span().data(), 0, span().size()); }
+ // Returns true if the flatbuffer is valid. Returns false if either:
+ // * The flatbuffer is incorrectly constructed (e.g., it points to memory
+ // locations outside of the current memory buffer).
+ // * The flatbuffer is too complex, and the flatbuffer verifier chosen to bail
+ // when attempting to traverse the tree of tables.
bool Verify() const {
if (span().size() < 4u) {
return false;