diff options
author | nginx <nginx@nginx.org> | 2014-09-16 14:45:43 +0000 |
---|---|---|
committer | Jon Kolb <kolbyjack@gmail.com> | 2014-09-16 14:45:43 +0000 |
commit | bb8c0683da773566e09797ef8a4ee00ad1e0f956 (patch) | |
tree | 5e2b511fa7d6f189171a65220d502d88f065d59d /src/core/ngx_regex.c | |
parent | 1176952193ccf47078dc84b8494d0496ad1ac4a2 (diff) | |
download | nginx-1.7.5.tar.gz |
Changes with nginx 1.7.5 16 Sep 2014v1.7.5
*) Security: it was possible to reuse SSL sessions in unrelated contexts
if a shared SSL session cache or the same TLS session ticket key was
used for multiple "server" blocks (CVE-2014-3616).
Thanks to Antoine Delignat-Lavaud.
*) Change: now the "stub_status" directive does not require a parameter.
*) Feature: the "always" parameter of the "add_header" directive.
*) Feature: the "proxy_next_upstream_tries",
"proxy_next_upstream_timeout", "fastcgi_next_upstream_tries",
"fastcgi_next_upstream_timeout", "memcached_next_upstream_tries",
"memcached_next_upstream_timeout", "scgi_next_upstream_tries",
"scgi_next_upstream_timeout", "uwsgi_next_upstream_tries", and
"uwsgi_next_upstream_timeout" directives.
*) Bugfix: in the "if" parameter of the "access_log" directive.
*) Bugfix: in the ngx_http_perl_module.
Thanks to Piotr Sikora.
*) Bugfix: the "listen" directive of the mail proxy module did not allow
to specify more than two parameters.
*) Bugfix: the "sub_filter" directive did not work with a string to
replace consisting of a single character.
*) Bugfix: requests might hang if resolver was used and a timeout
occurred during a DNS request.
*) Bugfix: in the ngx_http_spdy_module when using with AIO.
*) Bugfix: a segmentation fault might occur in a worker process if the
"set" directive was used to change the "$http_...", "$sent_http_...",
or "$upstream_http_..." variables.
*) Bugfix: in memory allocation error handling.
Thanks to Markus Linnala and Feng Gu.
Diffstat (limited to 'src/core/ngx_regex.c')
-rw-r--r-- | src/core/ngx_regex.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c index 3771aab8e..30acca5fc 100644 --- a/src/core/ngx_regex.c +++ b/src/core/ngx_regex.c @@ -149,7 +149,7 @@ ngx_regex_compile(ngx_regex_compile_t *rc) rc->regex = ngx_pcalloc(rc->pool, sizeof(ngx_regex_t)); if (rc->regex == NULL) { - return NGX_ERROR; + goto nomem; } rc->regex->code = re; @@ -159,7 +159,7 @@ ngx_regex_compile(ngx_regex_compile_t *rc) if (ngx_pcre_studies != NULL) { elt = ngx_list_push(ngx_pcre_studies); if (elt == NULL) { - return NGX_ERROR; + goto nomem; } elt->regex = rc->regex; @@ -204,7 +204,15 @@ failed: rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, p, &rc->pattern, n) - rc->err.data; - return NGX_OK; + return NGX_ERROR; + +nomem: + + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "regex \"%V\" compilation failed: no memory", + &rc->pattern) + - rc->err.data; + return NGX_ERROR; } |