summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-24 21:00:15 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-24 21:00:15 +0200
commit87f54463117654af48d6027986c2b21831d41616 (patch)
tree39c85be4d15ebf142c380a1fe4881ca4bc0ba4da /src/tty-ask-password-agent
parent7388cea30d676c4c2f8cb803f28d16470b35d015 (diff)
downloadsystemd-87f54463117654af48d6027986c2b21831d41616.tar.gz
string-util: introduce explicit_zero_safe()
The only real difference is that this wrapper can deal with NULL pointer arguments, but only if the length is also zero. CID 1396277
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 6c6f3be08c..088abecb7d 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -228,7 +228,7 @@ static int ask_password_plymouth(
r = 0;
finish:
- explicit_bzero(buffer, sizeof(buffer));
+ explicit_bzero_safe(buffer, sizeof(buffer));
return r;
}
@@ -275,7 +275,7 @@ static int send_passwords(const char *socket_name, char **passwords) {
r = (int) n;
finish:
- explicit_bzero(packet, packet_length);
+ explicit_bzero_safe(packet, packet_length);
return r;
}