Welcome! Log In Create A New Profile

Advanced

[PATCH] Fixed segmentation fault with empty config on Windows

Maxim Dounin
September 27, 2011 07:52AM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1317124226 -14400
# Node ID 7746ca466f939e2407373b5549b395fd12a72216
# Parent 959616f81d4d0b3045e78d8ac68ec7261a406b06
Fixed segmentation fault with empty config on Windows.

See here for report:
http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html

diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1747,10 +1747,12 @@ ngx_http_add_listening(ngx_conf_t *cf, n

#if (NGX_WIN32)
{
- ngx_iocp_conf_t *iocpcf;
-
- iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
- if (iocpcf->acceptex_read) {
+ ngx_iocp_conf_t *iocpcf = NULL;
+
+ if (ngx_get_conf(cf->cycle->conf_ctx, ngx_events_module)) {
+ iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
+ }
+ if (iocpcf && iocpcf->acceptex_read) {
ls->post_accept_buffer_size = cscf->client_header_buffer_size;
}
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Fixed segmentation fault with empty config on Windows

Maxim Dounin 1642 September 27, 2011 07:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 256
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready