Fix AddOutputFilterByType brown paper bag crash bug
Initialize pointers, fix off-by-one.
PR: 52755
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1294157 13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.4.2
+ *) mod_filter: Fix segfault with AddOutputFilterByType. PR 52755.
+ [Stefan Fritsch]
+
* mod_session: Sessions are encoded as application/x-www-form-urlencoded
strings, however we do not handle the encoding of spaces properly.
Fixed. [Graham Leggett]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * Fix AddOutputFilterByType brown paper bag crash bug
- Initialize pointers, fix off-by-one.
- PR: 52755
- Trunk patches: http://svn.apache.org/viewvc?view=revision&revision=1293405
- 2.4.x patch: Trunk patch works
- +1: minfrin, sf, trawick
-
* Enable per-module loglevel for mod_xml2enc and mod_proxy_html
Trunk patches: http://svn.apache.org/viewvc?view=revision&revision=1293708
2.4.x patch: Trunk patch works
f->ctx = fctx;
return OK;
}
+
static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
{
ap_filter_provider_t *provider;
NULL);
}
provider->expr = node;
+ provider->types = NULL;
}
else {
provider->types = types;
+ provider->expr = NULL;
}
provider->frec = provider_frec;
provider->next = frec->providers;
name = apr_pstrdup(cmd->temp_pool, argv[0]);
types = apr_palloc(cmd->pool, argc * sizeof(char *));
memcpy(types, &argv[1], (argc - 1) * sizeof(char *));
- types[argc] = NULL;
+ types[argc-1] = NULL;
for (pname = apr_strtok(name, ";", &strtok_state);
pname != NULL && rv == NULL;
pname = apr_strtok(NULL, ";", &strtok_state)) {