From: Dobrica Pavlinusic Date: Sat, 21 Mar 2009 17:02:57 +0000 (+0100) Subject: upstream nginx-0.7.41 X-Git-Tag: 0.7.41 X-Git-Url: http://git.rot13.org/?p=nginx.git;a=commitdiff_plain;h=refs%2Ftags%2F0.7.41;hp=72cfa48da0d7e9dece140f36e9f6ab08fd8c1eb8 upstream nginx-0.7.41 --- diff --git a/nginx/CHANGES b/nginx/CHANGES index ac86c53..8129db7 100644 --- a/nginx/CHANGES +++ b/nginx/CHANGES @@ -1,4 +1,12 @@ +Changes with nginx 0.7.41 11 Mar 2009 + + *) Bugfix: a segmentation fault might occur in worker process, if a + "server_name" or a "location" directives had captures in regular + expressions; the issue had appeared in 0.7.40. + Thanks to Vladimir Sopot. + + Changes with nginx 0.7.40 09 Mar 2009 *) Feature: the "location" directive supports captures in regular diff --git a/nginx/CHANGES.ru b/nginx/CHANGES.ru index 0f71c6e..575fa6c 100644 --- a/nginx/CHANGES.ru +++ b/nginx/CHANGES.ru @@ -1,4 +1,12 @@ +éÚÍÅÎÅÎÉÑ × nginx 0.7.41 11.03.2009 + + *) éÓÐÒÁ×ÌÅÎÉÅ: × ÒÁÂÏÞÅÍ ÐÒÏÃÅÓÓÅ ÍÏÇ ÐÒÏÉÚÏÊÔÉ segmentation fault, + ÅÓÌÉ × server_name ÉÌÉ location ÂÙÌÉ ×ÙÄÅÌÅÎÉÑ × ÒÅÇÕÌÑÒÎÙÈ + ×ÙÒÁÖÅÎÉÑÈ; ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.7.40. + óÐÁÓÉÂÏ ÷ÌÁÄÉÍÉÒÕ óÏÐÏÔÕ. + + éÚÍÅÎÅÎÉÑ × nginx 0.7.40 09.03.2009 *) äÏÂÁ×ÌÅÎÉÅ: ÄÉÒÅËÔÉ×Á location ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÙÄÅÌÅÎÉÑ × ÒÅÇÕÌÑÒÎÙÈ diff --git a/nginx/src/core/nginx.h b/nginx/src/core/nginx.h index 243712b..2c0406c 100644 --- a/nginx/src/core/nginx.h +++ b/nginx/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.7.40" +#define NGINX_VERSION "0.7.41" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/nginx/src/http/modules/perl/nginx.pm b/nginx/src/http/modules/perl/nginx.pm index 350a3d6..a780ee4 100644 --- a/nginx/src/http/modules/perl/nginx.pm +++ b/nginx/src/http/modules/perl/nginx.pm @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.7.40'; +our $VERSION = '0.7.41'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/nginx/src/http/ngx_http_core_module.c b/nginx/src/http/ngx_http_core_module.c index ad00946..a2d4e86 100644 --- a/nginx/src/http/ngx_http_core_module.c +++ b/nginx/src/http/ngx_http_core_module.c @@ -1380,9 +1380,9 @@ ngx_http_core_find_location(ngx_http_request_t *r) if ((*clcfp)->captures && r->captures == NULL) { - len = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); + len = (NGX_HTTP_MAX_CAPTURES + 1) * 3; - r->captures = ngx_palloc(r->pool, len); + r->captures = ngx_palloc(r->pool, len * sizeof(int)); if (r->captures == NULL) { return NGX_ERROR; } diff --git a/nginx/src/http/ngx_http_request.c b/nginx/src/http/ngx_http_request.c index 95a392a..c018d68 100644 --- a/nginx/src/http/ngx_http_request.c +++ b/nginx/src/http/ngx_http_request.c @@ -1662,9 +1662,9 @@ ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len) if (sn[i].captures && r->captures == NULL) { - ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); + ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3; - r->captures = ngx_palloc(r->pool, ncaptures); + r->captures = ngx_palloc(r->pool, ncaptures * sizeof(int)); if (r->captures == NULL) { return NGX_ERROR; }