ref: e3aee39a389700ad821a1619f114e226c1bd42d0
parent: 3043052e24a954359937062ee1b911541c2070ae
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 24 22:29:19 EST 2019
upas/smtp: fix %.*s format for challenge in smtpcram() the challenge should already be in ASCII format, but better safe than sorry.
--- a/sys/src/cmd/upas/smtp/smtp.c
+++ b/sys/src/cmd/upas/smtp/smtp.c
@@ -474,7 +474,7 @@
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);