Skip to content

Conversation

@klauspost
Copy link
Collaborator

Decided to make ReadArray always stop after an error. There is a too high risk of running into an infinite loop.

Added size checks for (Writer.)WriteBytes/WriteString/WriteStringFromBytes

Add panic recovery to binary marshal helpers.

Decided to make ReadArray always stop after an error.
There is a too high risk of running into an infinite loop.

Added size checks for (Writer.)WriteBytes/WriteString/WriteStringFromBytes

Add panic recovery to binary marshal helpers.
@klauspost klauspost merged commit d192f74 into tinylib:master Dec 4, 2025
3 checks passed
@klauspost klauspost deleted the update-fuzz-tests branch December 4, 2025 11:57
@philhofer
Copy link
Member

IMO we shouldn't be recovering from panics we don't throw ourselves. json.Marshal doesn't recover panics thrown by json.Marshalers: https://go.dev/play/p/KL0cUI1rmy3

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