attestantio / go-eth2-client

Apache License 2.0
102 stars 59 forks source link

`(s *Slot) UnmarshalJSON()` `panic` on malformed input #125

Closed infosecual closed 3 months ago

infosecual commented 3 months ago

This PR is very similar to #122. This is a PR to fix a panic in a json unmarshal routine that was found via fuzzing. This PR adds a minimum length check for a valid entry to (s *Slot) UnmarshalJSON() as well as a test for the malformed input.

infosecual commented 3 months ago

There are a few other instances of this same issue so I am closing this PR and just making one to fix them all