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

Port validator check incorrect #474

Open
tomhula opened this issue Jan 31, 2025 · 0 comments
Open

Port validator check incorrect #474

tomhula opened this issue Jan 31, 2025 · 0 comments

Comments

@tomhula
Copy link

tomhula commented Jan 31, 2025

Hi, I've tried the PortValidator and noticed, that it does the following check: port > 0 && port < Short.MAX_VALUE.
However Short is signed and so it's max value is different. The actual max value is whole unsigned 16 bits.
Also the check should be less than or equal to if I am not mistaken, since it already is the max value, not it's size.

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

No branches or pull requests

1 participant