shithub: front

Download patch

ref: 15ceba4fc9de64333f25cca8d519962526be9cb1
parent: 7276be7b2d13825b76f80be6f9122dbd975249fc
author: Jacob Moody <moody@posixcafe.org>
date: Wed Nov 6 19:40:57 EST 2024

git: fix off by one in strncmp

--- a/sys/src/cmd/git/proto.c
+++ b/sys/src/cmd/git/proto.c
@@ -158,7 +158,7 @@
 		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;
--