Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly reset BinaryWriter after finish #986

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

bhollis
Copy link
Contributor

@bhollis bhollis commented Oct 7, 2024

I noticed this while reading the BinaryWriter code - finish didn't properly reset the writer, so if it were reused the output would be invalid. I doubt anyone reuses writers, but it wasn't a hard fix.

Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, thanks for the fix!

@timostamm timostamm changed the title Bug fix: properly reset BinaryWriter after finish Properly reset BinaryWriter after finish Oct 8, 2024
@timostamm timostamm merged commit 0bc7cfa into bufbuild:main Oct 8, 2024
21 checks passed
@srikrsna-buf srikrsna-buf mentioned this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants