git: fix off by one in strncmp

This commit is contained in:
Jacob Moody 2024-11-07 00:40:57 +00:00
parent 7276be7b2d
commit 15ceba4fc9

View file

@ -158,7 +158,7 @@ parseuri(char *uri, char *proto, char *host, char *port, char *path, char *repo)
snprint(port, Nport, "80");
else if(strncmp(proto, "hjgit", 5) == 0)
snprint(port, Nport, "17021");
else if(strncmp(proto, "gits", 5) == 0)
else if(strncmp(proto, "gits", 4) == 0)
snprint(port, Nport, "9419");
else
hasport = 0;