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 out of bounds panic in registery #320

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Fix out of bounds panic in registery #320

merged 1 commit into from
Apr 4, 2022

Conversation

gammazero
Copy link
Collaborator

When registering or updating the registry with provider information that does not have provider addresses or publisher addresses, an out-of-bounds panic could happen because it was assumed that the provider info would at least have provider addresses.

This is not assumed now. If the situation is detected it is logged.

When registering or updating the registry with provider information that does not have provider addresses or publisher addresses, an out of bounds panic could happen because it was assumed that the provider info whould at least have provider addresses.

This is not assumed now.
log.Warnw("Register provider with no provider or publisher addresses",
"provider", info.AddrInfo.ID, "publisher", info.Publisher)
} else {
info.PublisherAddr = info.AddrInfo.Addrs[0]
Copy link
Member

Choose a reason for hiding this comment

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

file a low importance bug to be able to support multiple addresses round-robin :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gammazero gammazero merged commit f333592 into main Apr 4, 2022
@gammazero gammazero deleted the fix-registry-panic branch April 4, 2022 17:53
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