diff options
author | David Tardon <dtardon@redhat.com> | 2018-10-09 15:04:58 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2018-10-12 12:38:49 +0200 |
commit | f369f47c264dd56f630e91697006efd647542feb (patch) | |
tree | 4e7932928f26b104db1dc29496689682b953715f /src/login/pam_systemd.c | |
parent | 4db1879acdc0b853e1a7e6e650b6feb917175fac (diff) | |
download | systemd-f369f47c264dd56f630e91697006efd647542feb.tar.gz |
be consistent about sun_path length
Most places use the whole buffer for name, without leaving extra space
for the trailing NUL.
Diffstat (limited to 'src/login/pam_systemd.c')
-rw-r--r-- | src/login/pam_systemd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 8464df122c..90ccbd7a83 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -160,7 +160,7 @@ static int get_seat_from_display(const char *display, const char **seat, uint32_ r = socket_from_display(display, &p); if (r < 0) return r; - strncpy(sa.un.sun_path, p, sizeof(sa.un.sun_path)-1); + strncpy(sa.un.sun_path, p, sizeof(sa.un.sun_path)); fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (fd < 0) |