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

return err on empty multiaddr #231

Conversation

0xTylerHolmes
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR address?

This PR addresses an issue where the validation for the string and bytes constructors behave differently. validateBytes() checks that the multiaddr is not empty and returns an error if so. The string constructor does not which can lead an empty multiaddress with no error that will cause a panic when operated on.

@sukunrt
Copy link
Member

sukunrt commented Jan 26, 2024

@0xTylerHolmes
Copy link
Contributor Author

Oh you're right. Sorry about that, I had some issues in a local version of the repo I was doing some testing on. Must've got turned around. Closing this.

@0xTylerHolmes 0xTylerHolmes deleted the fix-empty-string-constructor branch January 28, 2024 14:49
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