AnantShukla-Git-Hub opened a new pull request, #3193:
URL: https://github.com/apache/brpc/pull/3193
Issue Number: resolves #3192
Problem Summary:
`str2endpoint(const char* str, EndPoint* point)` incorrectly accepts invalid
endpoint strings where the port number is followed by non-whitespace
characters (e.g. "127.0.0.1:8000a").
This happens because the current validation logic skips the first non-digit
character before checking for whitespace, causing invalid ports to be treated
as valid.
### What is changed and the side effects?
Changed:
- Fixed port validation logic in `str2endpoint` by ensuring that only
whitespace characters are skipped after port parsing.
- Invalid port strings with trailing non-whitespace characters are now
correctly rejected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]