attestantio / go-eth2-client

Apache License 2.0
102 stars 59 forks source link

Fix multiple `UnmarshalJSON()` `panics` #126

Closed infosecual closed 3 months ago

infosecual commented 3 months ago

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

This PR fixes the identified panics in:

mcdee commented 3 months ago

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 commented 3 months ago

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