diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-02-25 03:29:19 +0100 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-02-25 03:29:19 +0100 |
| commit | e3aee39a389700ad821a1619f114e226c1bd42d0 (patch) | |
| tree | 9ced4edec3f331ebfe0549a5d5c5693b9096bf34 | |
| parent | 3043052e24a954359937062ee1b911541c2070ae (diff) | |
| download | plan9front-e3aee39a389700ad821a1619f114e226c1bd42d0.tar.xz | |
upas/smtp: fix %.*s format for challenge in smtpcram()
the challenge should already be in ASCII format,
but better safe than sorry.
| -rw-r--r-- | sys/src/cmd/upas/smtp/smtp.c | 2 |
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); |
