summaryrefslogtreecommitdiffstats
path: root/crypto/http
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c
index 3bf642a4f4..f0fc770f22 100644
--- a/crypto/http/http_lib.c
+++ b/crypto/http/http_lib.c
@@ -87,11 +87,10 @@ int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
/* parse host name/address as far as needed here */
if (host[0] == '[') {
/* ipv6 literal, which may include ':' */
- host++;
- host_end = strchr(host, ']');
+ host_end = strchr(host + 1, ']');
if (host_end == NULL)
goto parse_err;
- p = host_end + 1;
+ p = ++host_end;
} else {
/* look for start of optional port, path, query, or fragment */
host_end = strchr(host, ':');