summaryrefslogtreecommitdiff
path: root/src/basic/ratelimit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-02-14 18:41:37 +0100
committerLennart Poettering <lennart@poettering.net>2018-02-14 18:47:20 +0100
commitfd6ac62c717dcef472b9b50f5e54f89b0105a7e2 (patch)
treee74fc09fa4e4701ff6df097b1a8d1e8e250dc671 /src/basic/ratelimit.h
parent65ee8660dfe6991ef15dee9cc588a91f317be059 (diff)
downloadsystemd-fd6ac62c717dcef472b9b50f5e54f89b0105a7e2.tar.gz
ask-password-api: many fixes to ask_password_tty()
A couple of fixes: 1. always bzero_explicit() away what we remove from the passphrase buffer. The UTF-8 code assumes the string remains NUL-terminated, and we hence should enforce that. memzero() would do too here, but let's be paranoid after all this is key material. 2. when clearing '*' characters from string, do so counting UTF-8 codepoints properly. We already have code in place to count UTF-8 codepoints when generating '*' characters, hence we should take the same care when clearing them again. 3. Treat NUL on input as an alternative terminator to newline or EOF. 4. When removing characters from the password always also reset the "codepoint" index properly.
Diffstat (limited to 'src/basic/ratelimit.h')
0 files changed, 0 insertions, 0 deletions