1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Clarify an existing requirement of the server_portstr parameter

to ap_proxy_determine_connection(): it must be a buffer of at
least one byte in size.

(And don't bother with using strcpy in order to zap a string.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592514 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2014-05-05 12:47:18 +00:00
parent 19b5b85316
commit a306773aa4
2 changed files with 5 additions and 3 deletions

View File

@@ -2329,8 +2329,9 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
/* Get the server port for the Via headers */
server_port = ap_get_server_port(r);
AP_DEBUG_ASSERT(server_portstr_size > 0);
if (ap_is_default_port(server_port, r)) {
strcpy(server_portstr,"");
server_portstr[0] = '\0';
}
else {
apr_snprintf(server_portstr, server_portstr_size, ":%d",