summaryrefslogtreecommitdiff
path: root/greeter/greet.c
diff options
context:
space:
mode:
Diffstat (limited to 'greeter/greet.c')
-rw-r--r--greeter/greet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/greeter/greet.c b/greeter/greet.c
index 6f17175..3802bb3 100644
--- a/greeter/greet.c
+++ b/greeter/greet.c
@@ -101,10 +101,8 @@ GreetDone (
data->name, strlen (data->passwd));
switch (status) {
case NOTIFY_OK:
- strncpy (name, data->name, sizeof(name));
- name[sizeof(name)-1] = '\0';
- strncpy (password, data->passwd, sizeof(password));
- password[sizeof(password)-1] = '\0';
+ strlcpy (name, data->name, sizeof(name));
+ strlcpy (password, data->passwd, sizeof(password));
code = 0;
done = 1;
break;