summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/upas/smtp/smtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/upas/smtp/smtp.c b/sys/src/cmd/upas/smtp/smtp.c
index 579751255..db8febfec 100644
--- a/sys/src/cmd/upas/smtp/smtp.c
+++ b/sys/src/cmd/upas/smtp/smtp.c
@@ -474,7 +474,7 @@ smtpcram(DS *ds)
return "cannot find user name";
for(i = 0; i < n; i++)
rbuf[i] = tolower(rbuf[i]);
- l = snprint(ubuf, sizeof ubuf, "%s %.*s", usr, n, rbuf);
+ l = snprint(ubuf, sizeof ubuf, "%s %.*s", usr, utfnlen(rbuf, n), rbuf);
snprint(ebuf, sizeof ebuf, "%.*[", l, ubuf);
dBprint("%s\r\n", ebuf);