This is an automated email from the ASF dual-hosted git repository. ChristopherSchultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git
commit 7b57bf6a232522bfe68f99936ead942175fed51d Author: Christopher Schultz <[email protected]> AuthorDate: Mon Jun 8 14:40:09 2026 -0400 Remove unnecessary null-terminators --- native/common/jk_connect.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/native/common/jk_connect.c b/native/common/jk_connect.c index 6b9d85418..812ebf1aa 100644 --- a/native/common/jk_connect.c +++ b/native/common/jk_connect.c @@ -1371,7 +1371,6 @@ char *jk_dump_sinfo(jk_sock_t sd, char *buf, size_t size) if (rsa->sa_family == JK_INET) { struct sockaddr_in *insa = (struct sockaddr_in *)rsa; if (inet_ntop4((unsigned char *)&insa->sin_addr, buf + ps, size - ps) == NULL) { - buf[ps] = '\0'; snprintf(pb, sizeof(pb), "InvalidAddr"); } else { snprintf(pb, sizeof(pb), ":%u", ntohs(insa->sin_port)); @@ -1381,7 +1380,6 @@ char *jk_dump_sinfo(jk_sock_t sd, char *buf, size_t size) else if (rsa->sa_family == JK_INET6) { struct sockaddr_in6 *insa = (struct sockaddr_in6 *)rsa; if (inet_ntop6((unsigned char *)&insa->sin6_addr, buf + ps, size - ps) == NULL) { - buf[ps] = '\0'; snprintf(pb, sizeof(pb), "InvalidAddr"); } else { snprintf(pb, sizeof(pb), ":%u", ntohs(insa->sin6_port)); @@ -1389,7 +1387,6 @@ char *jk_dump_sinfo(jk_sock_t sd, char *buf, size_t size) } #endif else { - buf[ps] = '\0'; snprintf(pb, sizeof(pb), "UnknownFamily"); } ps = strlen(buf); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
