The Python builder implementation does not consider the object size when it does vtable de-duplication. This can lead to an object using a vtable indicating an object size smaller than the actual object.
E.g. in this example both objects will share the same vtable, with the second object being larger than the size in the vtable.
builder = flatbuffers.Builder()
builder.StartObject(1)
builder.PrependInt32Slot(0, 1, 0)
obj1 = builder.EndObject()
builder.StartObject(1)
builder.PrependInt64Slot(0, 2, 0)
obj2 = builder.EndObject()
builder.Finish(obj2)