The port number starts after the ':'.
Index: http.c
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/http.c,v
retrieving revision 1.7
diff -u -p -r1.7 http.c
--- http.c 18 Mar 2021 15:40:45 -0000 1.7
+++ http.c 18 Mar 2021 15:41:06 -0000
@@ -364,7 +364,7 @@ http_parse_uri(char *uri, char **ohost,
if (hosttail[1] == '/' || hosttail[1] == ':')
host++;
if (hosttail[1] == ':')
- port = hosttail + 1;
+ port = hosttail + 2;
if ((scope = memchr(host, '%', hosttail - host)) != NULL)
hosttail = scope;
} else {