changeset 474:3a4102b00f97 NGINX_0_7_49

nginx 0.7.49 *) Change: a segmentation fault might occur in worker process, if the $arg_... variables were used; the bug had appeared in 0.7.48.
author Igor Sysoev <http://sysoev.ru>
date Mon, 06 Apr 2009 00:00:00 +0400
parents 66d24abdb0c2
children aed0c0cf845d
files CHANGES CHANGES.ru src/core/nginx.h src/core/ngx_string.c src/http/modules/perl/nginx.pm
diffstat 5 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon Apr 06 00:00:00 2009 +0400
+++ b/CHANGES	Mon Apr 06 00:00:00 2009 +0400
@@ -1,4 +1,10 @@
 
+Changes with nginx 0.7.49                                        06 Apr 2009
+
+    *) Change: a segmentation fault might occur in worker process, if the 
+       $arg_... variables were used; the bug had appeared in 0.7.48.
+
+
 Changes with nginx 0.7.48                                        06 Apr 2009
 
     *) Feature: the "proxy_cache_key" directive.
--- a/CHANGES.ru	Mon Apr 06 00:00:00 2009 +0400
+++ b/CHANGES.ru	Mon Apr 06 00:00:00 2009 +0400
@@ -1,4 +1,10 @@
 
+Изменения в nginx 0.7.49                                          06.04.2009
+
+    *) Изменение: если использовании переменных $arg_... в рабочем процессе 
+       мог произойти segmentation fault; ошибка появилась в 0.7.48.
+
+
 Изменения в nginx 0.7.48                                          06.04.2009
 
     *) Добавление: директива proxy_cache_key.
--- a/src/core/nginx.h	Mon Apr 06 00:00:00 2009 +0400
+++ b/src/core/nginx.h	Mon Apr 06 00:00:00 2009 +0400
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version       007048
-#define NGINX_VERSION      "0.7.48"
+#define nginx_version       007049
+#define NGINX_VERSION      "0.7.49"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/core/ngx_string.c	Mon Apr 06 00:00:00 2009 +0400
+++ b/src/core/ngx_string.c	Mon Apr 06 00:00:00 2009 +0400
@@ -703,6 +703,10 @@
 {
     ngx_uint_t  c1, c2;
 
+    if (s1 <= last) {
+        return NULL;
+    }
+
     c2 = (ngx_uint_t) *s2++;
     c2  = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2;
     last -= n;
--- a/src/http/modules/perl/nginx.pm	Mon Apr 06 00:00:00 2009 +0400
+++ b/src/http/modules/perl/nginx.pm	Mon Apr 06 00:00:00 2009 +0400
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.7.48';
+our $VERSION = '0.7.49';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);