Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement a separate pass for checking the size of encoded structures. #16
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the user has bounded the size during serialization, instead of checking the size bounds while writing to the out buffer, run a separate pass through the serialization API to check what the size would be before writing starts.
This means that all oversized messages will be caught before they pollute the output target.