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 multiple UnmarshalJSON() panics #126

Merged
merged 8 commits into from
Apr 3, 2024

Conversation

infosecual
Copy link
Contributor

This is similar to #122. These panics where found while fuzzing with Nosy.

This PR fixes the identified panics in:

  • (p *ParticipationFlags) UnmarshalJSON()
  • (w *WithdrawalIndex) UnmarshalJSON()
  • (b *BlobIndex) UnmarshalJSON()
  • (s *Slot) UnmarshalJSON()
  • (v *ValidatorIndex) UnmarshalJSON()

@mcdee
Copy link
Contributor

mcdee commented Apr 1, 2024

The fixes look good, but the test filenames seem to be named somewhat oddly. Please could you name them so that they match the filenames of the functions they are testing, for example putting TestWithdrawalIndexUnmarshalJSON in withdrawalindex_test.go? Thanks.

@infosecual
Copy link
Contributor Author

infosecual commented Apr 3, 2024

Done. I also split gwei_test.go into 3 separate files and renamed to correspond to the file that they test.

@mcdee mcdee merged commit 48c181e into attestantio:master Apr 3, 2024
2 checks passed
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