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;
diff --git a/third_party/flatbuffers/include/flatbuffers/reflection.h b/third_party/flatbuffers/include/flatbuffers/reflection.h
index 1aa0863..84213c7 100644
--- a/third_party/flatbuffers/include/flatbuffers/reflection.h
+++ b/third_party/flatbuffers/include/flatbuffers/reflection.h
@@ -508,14 +508,19 @@
 // root should point to the root type for this flatbuffer.
 // buf should point to the start of flatbuffer data.
 // length specifies the size of the flatbuffer data.
+// 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 reflection::Schema &schema, const reflection::Object &root,
             const uint8_t *buf, size_t length, uoffset_t max_depth = 64,
-            uoffset_t max_tables = 1000000);
+            uoffset_t max_tables = 3000000);
 
 bool VerifySizePrefixed(const reflection::Schema &schema,
                         const reflection::Object &root, const uint8_t *buf,
                         size_t length, uoffset_t max_depth = 64,
-                        uoffset_t max_tables = 1000000);
+                        uoffset_t max_tables = 3000000);
 
 }  // namespace flatbuffers