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

Fix Diagnose to return io.EOF error on empty data #410

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

fxamacker
Copy link
Owner

Update Diagnose() to return io.EOF on empty input, to make it consistent with DiagnoseFirst(), Unmarshal(), and UnmarshalFirst().

This was detected while updating fuzz tests for v2.5.0-beta3.

Closes #409

@fxamacker fxamacker self-assigned this Jun 18, 2023
@fxamacker fxamacker merged commit 3ae4001 into master Jun 18, 2023
@fxamacker fxamacker deleted the fxamacker/fix-diagnose-empty-data-error branch June 18, 2023 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug (v2.5.0-beta3): Diagnose() should return io.EOF on empty input
1 participant