ref: a7ab8158395039091ef1bad3f18748b77b9a4cdc
parent: 80b18900935f45afa1ec4c887ffa0ceb21fa0231
author: cinap_lenrek <[email protected]>
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;