summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
5 files changed, 14 insertions, 12 deletions
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);