*) mod_proxy_fcgi, mod_fcgid: Fix crashes in ap_fcgi_encoded_env_len() when
modules add empty environment variables to the request. PR60275.
[<alex2grad AT gmail.com>]
Submitted By: <alex2grad AT gmail.com>]
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1775487 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_proxy_fcgi, mod_fcgid: Fix crashes in ap_fcgi_encoded_env_len() when
+ modules add empty environment variables to the request. PR60275.
+ [<alex2grad AT gmail.com>]
+
*) mod_rewrite: Limit runaway memory use by short circuiting some kinds of
looping RewriteRules when the local path significantly exceeds
LimitRequestLine. PR 60478. [Jeff Wheelhouse <apache wheelhouse.org>]
envlen += keylen;
- vallen = strlen(elts[i].val);
+ vallen = elts[i].val ? strlen(elts[i].val) : 0;
if (vallen >> 7 == 0) {
envlen += 1;
buflen -= 4;
}
- vallen = strlen(elts[i].val);
+ vallen = elts[i].val ? strlen(elts[i].val) : 0;
if (vallen >> 7 == 0) {
if (buflen < 1) {
rv = APR_ENOSPC; /* overflow */
break;
}
- memcpy(itr, elts[i].val, vallen);
- itr += vallen;
+
+ if (elts[i].val) {
+ memcpy(itr, elts[i].val, vallen);
+ itr += vallen;
+ }
if (buflen == vallen) {
(*starting_elem)++;