git: 9front

Download patch

ref: 6072f80b3540f3c51e52a0157053bdf171c9797c
parent: 5ac331125fd5d571cc62d7266301b02e6996e6d2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 31 11:43:00 EDT 2022

lib9p: double the buffer for /srv/$service

Use a buffer bigger than the name limit of devsrv
(127 characters), as this will produce the correct
error message when trying to create the srv file
instead of silently truncating the buffer before.

--- a/sys/src/lib9p/post.c
+++ b/sys/src/lib9p/post.c
@@ -20,7 +20,7 @@
 	if(pipe(fd) < 0)
 		return -1;
 	if(name != nil){
-		char buf[80];
+		char buf[160];
 
 		snprint(buf, sizeof buf, "/srv/%s", name);
 		if((cfd = create(buf, OWRITE|ORCLOSE|OCEXEC, 0600)) < 0
--