upas/smtp: fix %.*s format for challenge in smtpcram()

the challenge should already be in ASCII format,
but better safe than sorry.
This commit is contained in:
cinap_lenrek 2019-02-25 03:29:19 +01:00
parent 3043052e24
commit e3aee39a38

View file

@ -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);