PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_ssl: fix a potential NULL dereference spotted by gcc 8.1.0
- mod_http2: silence gcc strncpy warnings which break compilation in
- maintainer mode with gcc 8.1.0
- trunk patch: http://svn.apache.org/r1831231
- http://svn.apache.org/r1831591
- http://svn.apache.org/r1832934
- http://svn.apache.org/r1832937
- 2.4.x patch: svn merge -c 1831231,1831591,1832934,1832937 ^/httpd/httpd/trunk .
- +1: ylavic, icing, jailletc36 (by inspection)
-
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
delta = nlen - olen;
plen = ctx->slen + delta + 1;
p = apr_pcalloc(ctx->pool, plen);
- strncpy(p, ctx->s, start);
- strncpy(p + start, ns, nlen);
+ memcpy(p, ctx->s, start);
+ memcpy(p + start, ns, nlen);
strcpy(p + start + nlen, ctx->s + end);
ctx->s = p;
ctx->slen = (int)strlen(p);
/* common to use relative uris in link header, for mappings
* to work need to prefix the backend server uri */
need_len += ctx->psu_len;
- strncpy(buffer, ctx->p_server_uri, sizeof(buffer));
+ apr_cpystrn(buffer, ctx->p_server_uri, sizeof(buffer));
buffer_len = ctx->psu_len;
}
if (need_len > sizeof(buffer)) {
"link_reverse_map uri too long, skipped: %s", ctx->s);
return;
}
- strncpy(buffer + buffer_len, ctx->s + ctx->link_start, link_len);
- buffer_len += link_len;
- buffer[buffer_len] = '\0';
+ apr_cpystrn(buffer + buffer_len, ctx->s + ctx->link_start, link_len + 1);
if (!prepend_p_server
&& strcmp(ctx->real_backend_uri, ctx->p_server_uri)
&& !strncmp(buffer, ctx->real_backend_uri, ctx->rbu_len)) {
* to work, we need to use the proxy uri */
int path_start = ctx->link_start + ctx->rbu_len;
link_len -= ctx->rbu_len;
- strcpy(buffer, ctx->p_server_uri);
- strncpy(buffer + ctx->psu_len, ctx->s + path_start, link_len);
+ memcpy(buffer, ctx->p_server_uri, ctx->psu_len);
+ memcpy(buffer + ctx->psu_len, ctx->s + path_start, link_len);
buffer_len = ctx->psu_len + link_len;
buffer[buffer_len] = '\0';
}