From 4e9cd5034841efd661436fbbc850874c1775a395 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 21 Mar 2009 18:02:57 +0100 Subject: [PATCH] upstream nginx-0.7.41 --- nginx/CHANGES | 8 ++++++++ nginx/CHANGES.ru | 8 ++++++++ nginx/src/core/nginx.h | 2 +- nginx/src/http/modules/perl/nginx.pm | 2 +- nginx/src/http/ngx_http_core_module.c | 4 ++-- nginx/src/http/ngx_http_request.c | 4 ++-- 6 files changed, 22 insertions(+), 6 deletions(-) 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; } -- 2.20.1