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 port string to uint16 parsing #6291

Conversation

taylanisikdemir
Copy link
Member

What changed?
Port strings are parsed to uint16 in ringpop library. Ports can be numbered from 0 to 65535 which is uint16 range.
Currently the parsing is done using ParseInt instead of ParseUint which fails to parse ports greater than 32767.

Why?
Avoid bugs for port numbers > 32767.

How did you test it?
Unit test.

@taylanisikdemir taylanisikdemir enabled auto-merge (squash) September 17, 2024 19:50
@taylanisikdemir taylanisikdemir merged commit 2458cad into cadence-workflow:master Sep 17, 2024
17 of 18 checks passed
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.13%. Comparing base (78eb2c8) to head (011c1df).
Report is 1 commits behind head on master.

Additional details and impacted files
Files with missing lines Coverage Δ
common/peerprovider/ringpopprovider/provider.go 3.90% <100.00%> (+3.90%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78eb2c8...011c1df. Read the comment docs.

@taylanisikdemir taylanisikdemir deleted the taylan/fix_port_parsing branch September 17, 2024 20:59
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