ywkaras commented on a change in pull request #7787:
URL: https://github.com/apache/trafficserver/pull/7787#discussion_r627433349
##########
File path: proxy/http/remap/unit-tests/nexthop_test_stubs.cc
##########
@@ -125,6 +125,14 @@ build_request(int64_t sm_id, HttpSM *sm, sockaddr_in *ip,
const char *os_hostnam
sm->t_state.txn_conf =
reinterpret_cast<OverridableHttpConfigParams *>(_my_txn_conf);
}
+void
+GetConfigInteger(int *v, const char *n)
+{
+ if (strncmp(n, "proxy.config.http.parent_proxy.max_trans_retries",
strlen(n)) == 0) {
Review comment:
I think the safety issue is that a C string might have a missing null
terminator. But strncmp() only helps with that if it's got a constant as the
length. strcmp() is a safe as strncmp() if one of the strings is a string
literal.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]