summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-05-07 23:08:53 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-05-07 23:08:53 -0400
commit598cdd0e5ec5417b5c72d519c6e9786a5834cb21 (patch)
treea60c49c722c929a36f69ba89327534148b3cdbe0 /src/network.c
parent1ca52fdce3b87f7748dd5db6f59d738ed7a9efe1 (diff)
downloadlighttpd1.4-598cdd0e5ec5417b5c72d519c6e9786a5834cb21.tar.gz
lighttpd1.4-598cdd0e5ec5417b5c72d519c6e9786a5834cb21.zip
[core] fix IPv6 address + port parsing (#2204)
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 46b4be8e..19364eaa 100644
--- a/src/network.c
+++ b/src/network.c
@@ -213,8 +213,8 @@ static int network_server_init(server *srv, buffer *host_token, specific_config
sp = b->ptr + len; /* point to '\0' at end of string so end of IPv6 address can be found below */
} else {
/* found ip:port separator at *sp; port doesn't end in ']', so *sp hopefully doesn't split an IPv6 address */
- *(sp++) = '\0';
- port = strtol(sp, NULL, 10);
+ *sp = '\0';
+ port = strtol(sp+1, NULL, 10);
}
/* check for [ and ] */