phoenixlen opened a new issue, #3192:
URL: https://github.com/apache/brpc/issues/3192

   **Describe the bug**
   file: butil/endpoint.cpp
   function: int str2endpoint(const char* str, EndPoint* point) {
   line: 291 for (++end; isspace(*end); ++end);
   first "++end" is bug?  should be for (; isspace(*end); ++end);
   第一个"++end"是bug吧?应该是for (; isspace(*end); ++end);
   char* end = NULL;
       point->port = strtol(str + i, &end, 10);
       if (end == str + i) {
           return -1;
       } else if (*end) {
           for (++end; isspace(*end); ++end);  // <-- BUG: increments end 
before checking
           if (*end) {
               return -1;
           }
       }
   example: "0.0.0.0:8000a" is ok
   例如"0.0.0.0:8000a" 中的a就被跳过了。
   **To Reproduce**
   
   
   **Expected behavior**
   
   
   **Versions**  1.14.1
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots**
   
   


-- 
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]

Reply via email to