ref: 80a1d1ab934b9dcb89833410a48f9da7260c32fe
parent: 1335a57865c1a966a58437779d15aa63a775d64e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 22:49:17 EST 2019
ip/tftpd: fix %.*s format for homedir path
--- a/sys/src/cmd/ip/tftpd.c
+++ b/sys/src/cmd/ip/tftpd.c
@@ -145,7 +145,7 @@
dirsllen = strlen(homedir);
while(dirsllen > 0 && homedir[dirsllen-1] == '/')
dirsllen--;
- dirsl = smprint("%.*s/", dirsllen, homedir);
+ dirsl = smprint("%.*s/", utfnlen(homedir, dirsllen), homedir);
fmtinstall('E', eipfmt);
fmtinstall('I', eipfmt);