git: 9front

Download patch

ref: 26088b1b99260e1bc41c187f4805ab2f53e482fb
parent: 56f54dbb79df6f711f064a3b5c1e50fbaaa32d01
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 22:53:09 EST 2019

ip/cifsd: fix %.*s format xdirflush() path

--- a/sys/src/cmd/ip/cifsd/dir.c
+++ b/sys/src/cmd/ip/cifsd/dir.c
@@ -205,7 +205,7 @@
 	n = strlen(path);
 	if(s = strrchr(path, '/'))
 		n = s - path;
-	d = smprint("%.*s", n, path);
+	d = smprint("%.*s", utfnlen(path, n), path);
 	s = malloc(++n);
 	for(pp = &xdirlist; x = *pp; pp = xx){
 		xx = &x->next;
--