mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 05:04:13 +00:00
Incorrect buffer size check fixed.
This commit is contained in:
@@ -245,7 +245,7 @@ class Builder(object):
|
|||||||
def growByteBuffer(self):
|
def growByteBuffer(self):
|
||||||
"""Doubles the size of the byteslice, and copies the old data towards
|
"""Doubles the size of the byteslice, and copies the old data towards
|
||||||
the end of the new buffer (since we build the buffer backwards)."""
|
the end of the new buffer (since we build the buffer backwards)."""
|
||||||
if not len(self.Bytes) <= Builder.MAX_BUFFER_SIZE:
|
if len(self.Bytes) == Builder.MAX_BUFFER_SIZE:
|
||||||
msg = "flatbuffers: cannot grow buffer beyond 2 gigabytes"
|
msg = "flatbuffers: cannot grow buffer beyond 2 gigabytes"
|
||||||
raise BuilderSizeError(msg)
|
raise BuilderSizeError(msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user