From cee1aca97fdef7f761d1ca81b0f1d546c70a6f11 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Tue, 9 Jul 2013 18:16:35 -0700 Subject: [PATCH] checked in nginx-1.4.1-unix_socket_accept_over_read.patch. --- .../nginx-1.4.1-unix_socket_accept_over_read.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/nginx-1.4.1-unix_socket_accept_over_read.patch diff --git a/patches/nginx-1.4.1-unix_socket_accept_over_read.patch b/patches/nginx-1.4.1-unix_socket_accept_over_read.patch new file mode 100644 index 0000000..2efdd56 --- /dev/null +++ b/patches/nginx-1.4.1-unix_socket_accept_over_read.patch @@ -0,0 +1,11 @@ +--- nginx-1.4.1/src/event/ngx_event_accept.c 2013-05-06 03:26:50.000000000 -0700 ++++ nginx-1.4.1-patched/src/event/ngx_event_accept.c 2013-07-09 17:41:42.688468839 -0700 +@@ -268,7 +268,7 @@ ngx_event_accept(ngx_event_t *ev) + wev->own_lock = &c->lock; + #endif + +- if (ls->addr_ntop) { ++ if (ls->addr_ntop && socklen > sizeof(c->sockaddr->sa_family)) { + c->addr_text.data = ngx_pnalloc(c->pool, ls->addr_text_max_len); + if (c->addr_text.data == NULL) { + ngx_close_accepted_connection(c);