From a84ffa1accef6e4900a7ff3462e9448574b2fb0a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 31 Oct 2022 15:43:00 +0000 Subject: 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. --- sys/src/lib9p/post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/lib9p/post.c b/sys/src/lib9p/post.c index b2134968c..2b4defd99 100644 --- a/sys/src/lib9p/post.c +++ b/sys/src/lib9p/post.c @@ -20,7 +20,7 @@ postsrv(Srv *s, char *name) 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 -- cgit v1.2.3