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

bugfix: check if both begin and end are numbers in UnmarshalJSON #2242

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

brunoerg
Copy link
Contributor

In the current code, if we provide a non-number value (e.g. "method":"deriveaddresses","params":["A",["A","B"]]), it might cause a panic. This PR fixes it.

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM 🎉

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10514904620

Details

  • 5 of 7 (71.43%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 57.235%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btcjson/walletsvrcmds.go 5 7 71.43%
Files with Coverage Reduction New Missed Lines %
mempool/mempool.go 1 66.67%
peer/peer.go 5 74.16%
Totals Coverage Status
Change from base Build 10411760109: 0.008%
Covered Lines: 29845
Relevant Lines: 52145

💛 - Coveralls

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 📈

@Roasbeef Roasbeef merged commit 1a1dd2a into btcsuite:master Aug 23, 2024
3 checks passed
@brunoerg brunoerg deleted the 2024-08-fix-unmarshaljson branch August 23, 2024 19:24
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.

4 participants