]> git.kaiwu.me - nginx.git/commitdiff
Core: allocate enough memory to hold IPv6 text address plus port.
authorRuslan Ermilov <ru@nginx.com>
Sat, 22 Feb 2014 08:08:31 +0000 (12:08 +0400)
committerRuslan Ermilov <ru@nginx.com>
Sat, 22 Feb 2014 08:08:31 +0000 (12:08 +0400)
src/core/ngx_connection.c

index 845b9161aab91cc3297730f5d259c1242238a4d6..6b6e3b3a512eb27bfb00b8eb893af66bd302c04e 100644 (file)
@@ -129,7 +129,7 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
 #if (NGX_HAVE_INET6)
         case AF_INET6:
              ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN;
-             len = NGX_INET6_ADDRSTRLEN + sizeof(":65535") - 1;
+             len = NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1;
              break;
 #endif