summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES15
-rw-r--r--CHANGES.ru14
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_md5.c3
-rw-r--r--src/core/ngx_resolver.c14
-rw-r--r--src/http/modules/ngx_http_mp4_module.c3
-rw-r--r--src/http/modules/perl/nginx.pm2
7 files changed, 43 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index 2c8038caa..6589dc014 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,19 @@
+Changes with nginx 1.0.10 15 Nov 2011
+
+ *) Bugfix: a segmentation fault might occur in a worker process if
+ resolver got a big DNS response.
+ Thanks to Ben Hawkes.
+
+ *) Bugfix: in cache key calculation if internal MD5 implementation was
+ used; the bug had appeared in 1.0.4.
+
+ *) Bugfix: the module ngx_http_mp4_module sent incorrect
+ "Content-Length" response header line if the "start" argument was
+ used.
+ Thanks to Piotr Sikora.
+
+
Changes with nginx 1.0.9 01 Nov 2011
*) Change: now the 0x7F-0x1F characters are escaped as \xXX in an
diff --git a/CHANGES.ru b/CHANGES.ru
index 3968eeaf1..1255982f6 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,18 @@
+Изменения в nginx 1.0.10 15.11.2011
+
+ *) Исправление: в рабочем процессе мог произойти segmentation fault,
+ если resolver получил большой DNS-ответ.
+ Спасибо Ben Hawkes.
+
+ *) Исправление: в вычислении ключа для кэширования, если использовалась
+ внутренняя реализация MD5; ошибка появилась в 1.0.4.
+
+ *) Исправление: модуль ngx_http_mp4_module выдавал неверную строку
+ "Content-Length" в заголовке ответа, использовался аргумент start.
+ Спасибо Piotr Sikora.
+
+
Изменения в nginx 1.0.9 01.11.2011
*) Изменение: теперь символы 0x7F-0xFF в access_log записываются в виде
diff --git a/src/core/nginx.h b/src/core/nginx.h
index e528d8441..edec76299 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,8 +8,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1000009
-#define NGINX_VERSION "1.0.9"
+#define nginx_version 1000010
+#define NGINX_VERSION "1.0.10"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_md5.c b/src/core/ngx_md5.c
index 09a93991e..440c75bca 100644
--- a/src/core/ngx_md5.c
+++ b/src/core/ngx_md5.c
@@ -47,7 +47,8 @@ ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size)
return;
}
- data = ngx_cpymem(&ctx->buffer[used], data, free);
+ ngx_memcpy(&ctx->buffer[used], data, free);
+ data = (u_char *) data + free;
size -= free;
(void) ngx_md5_body(ctx, ctx->buffer, 64);
}
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
index ab7883011..32cd555b5 100644
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -1922,7 +1922,13 @@ done:
n = *src++;
for ( ;; ) {
- if (n != 0xc0) {
+ if (n & 0xc0) {
+ n = ((n & 0x3f) << 8) + *src;
+ src = &buf[n];
+
+ n = *src++;
+
+ } else {
ngx_memcpy(dst, src, n);
dst += n;
src += n;
@@ -1932,12 +1938,6 @@ done:
if (n != 0) {
*dst++ = '.';
}
-
- } else {
- n = ((n & 0x3f) << 8) + *src;
- src = &buf[n];
-
- n = *src++;
}
if (n == 0) {
diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c
index a6752123a..a4a47ee8e 100644
--- a/src/http/modules/ngx_http_mp4_module.c
+++ b/src/http/modules/ngx_http_mp4_module.c
@@ -1066,7 +1066,6 @@ ngx_http_mp4_update_mdat_atom(ngx_http_mp4_file_t *mp4, off_t start_offset)
atom_data_size = mp4->mdat_data.buf->file_last - start_offset;
mp4->mdat_data.buf->file_pos = start_offset;
- mp4->content_length += atom_data_size;
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
"mdat new offset @%O:%O", start_offset, atom_data_size);
@@ -1083,6 +1082,8 @@ ngx_http_mp4_update_mdat_atom(ngx_http_mp4_file_t *mp4, off_t start_offset)
atom_header_size = sizeof(ngx_mp4_atom_header_t);
}
+ mp4->content_length += atom_header_size + atom_data_size;
+
ngx_mp4_set_32value(atom_header, atom_size);
ngx_mp4_set_atom_name(atom_header, 'm', 'd', 'a', 't');
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index fc232a416..ca9551334 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -48,7 +48,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '1.0.9';
+our $VERSION = '1.0.10';
require XSLoader;
XSLoader::load('nginx', $VERSION);