diff options
author | wrmr | 2024-11-06 00:06:11 -0500 |
---|---|---|
committer | wrmr | 2024-11-06 00:06:11 -0500 |
commit | c38691b0001b477e2915ea90971e2ebc76e854ad (patch) | |
tree | 4a1b40dba9c2f16355f123d1e43a9701d05cf3ea /net.c | |
parent | 5fe796490718f84d20ff9c836ce75d5318d44c69 (diff) |
fix off-by-one error in port parsing
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net.c b/net.c index 6fbfa97..b3f0655 100644 --- a/net.c +++ b/net.c @@ -53,7 +53,7 @@ int net_addr(const char *url, struct addr *adr, enum protocol prot_default) { char *colon = strchr(adr->host, ':'); if (colon) { errno = 0; - int port = strtoul(colon, NULL, 10); + int port = strtoul(colon + 1, NULL, 10); if (errno) { return -1; } else { |