Changes with Apache 2.0.50
+ *) Fix a bunch of cases where the return code of the regex compiler
+ was not checked properly. This affects: mod_setenvif, mod_usertrack,
+ mod_proxy, mod_proxy_ftp and core. PR 28218. [André Malo]
+
*) mod_ssl: Fix a potential segfault in the 'shmcb' session cache for
small cache sizes. PR 27751. [Geoff Thorpe <geoff geoffthorpe.net>]
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/06/02 14:30:40 $]
+Last modified at [$Date: 2004/06/02 22:40:21 $]
Release:
modules/loggers/mod_log_config.c: r1.116
+1: nd
- *) Fix a bunch of cases where the return code of the regex compiler
- was not checked properly. The 1.3-diff is here:
- http://www.apache.org/~nd/regex-return-1.3.diff (only core and
- mod_usertrack affected). PR 28218.
- modules/metadata/mod_setenvif.c: r1.51
- modules/metadata/mod_usertrack.c: r1.52
- modules/proxy/mod_proxy.c: r1.99
- modules/proxy/proxy_ftp.c: r1.140
- server/core.c: r1.272
- +1: nd, trawick, jorton
-
*) mod_usertrack: Escape the cookie_name before pasting into the regexp.
(2.0 + 1.3)
modules/metadata/mod_usertrack.c: r1.51
*/
regex_t *preg = ap_pregcomp(p, "^[-A-Za-z0-9_]*$",
(REG_EXTENDED | REG_NOSUB ));
- if (preg) {
- if (ap_regexec(preg, name, 0, NULL, 0)) {
- return 1;
- }
+ ap_assert(preg != NULL);
+
+ if (ap_regexec(preg, name, 0, NULL, 0)) {
+ return 1;
}
+
return 0;
}
dcfg->regexp_string = apr_pstrcat(p, "^", cookie_name, "=([^;]+)|;[ \t]+", cookie_name, "=([^;]+)", NULL);
dcfg->regexp = ap_pregcomp(p, dcfg->regexp_string, REG_EXTENDED);
+ ap_assert(dcfg->regexp != NULL);
}
static int spot_cookie(request_rec *r)
*/
if (thiscmd->cmd_data) { /* <ProxyMatch> */
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else if (!strcmp(cmd->path, "~")) {
cmd->path = ap_getword_conf(cmd->pool, &arg);
if (strncasecmp(cmd->path, "proxy:", 6))
cmd->path += 6;
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
/* initialize our config and fetch it */
/* Compile the output format of "ls -s1" as a fallback for non-unix ftp listings */
re = ap_pregcomp(p, LS_REG_PATTERN, REG_EXTENDED);
+ ap_assert(re != NULL);
/* get a complete line */
/* if the buffer overruns - throw data away */
if (!cmd->path)
return "<Directory ~ > block must specify a path";
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else if (thiscmd->cmd_data) { /* <DirectoryMatch> */
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else if (!strcmp(cmd->path, "/") == 0)
{
if (thiscmd->cmd_data) { /* <LocationMatch> */
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else if (!strcmp(cmd->path, "~")) {
cmd->path = ap_getword_conf(cmd->pool, &arg);
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
/* initialize our config and fetch it */
if (thiscmd->cmd_data) { /* <FilesMatch> */
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else if (!strcmp(cmd->path, "~")) {
cmd->path = ap_getword_conf(cmd->pool, &arg);
r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
+ if (!r) {
+ return "Regex could not be compiled";
+ }
}
else {
char *newpath;