summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2011-11-15 19:16:51 +0000
committersthen <sthen@openbsd.org>2011-11-15 19:16:51 +0000
commitf753fd67ca4c9ae7fe3eecc86d385270bb19f926 (patch)
tree5bb741452fae155758e0c9e365ba52ea030d9e41 /usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c
parenton failure, the hibernate io function should return an errno type variable, (diff)
downloadwireguard-openbsd-f753fd67ca4c9ae7fe3eecc86d385270bb19f926.tar.xz
wireguard-openbsd-f753fd67ca4c9ae7fe3eecc86d385270bb19f926.zip
Update to nginx 1.0.10. Bugs fixed include a segmentation fault in a worker
process if the resolver receives a large DNS response. OK robert@
Diffstat (limited to 'usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c')
-rw-r--r--usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c
index a6752123aa9..a4a47ee8efc 100644
--- a/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c
+++ b/usr.sbin/nginx/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');