ref: 15575c53102437f52ab7355d63b59688ee5614fb
parent: 6f43504150a0f684ab55ee901e81bf95f6d7d4e0
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);--
⑨