Use strlcpy instead of strncpy, thanks to Antoine Brodin.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22390 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-12-31 10:12:48 +00:00
parent ab855779e9
commit 39733fdb03

View File

@@ -1840,10 +1840,8 @@ jobend(jid, path, user)
}
if (path) {
strncpy(saved_path, path, sizeof(wtmp.ut_tpath));
strncpy(saved_user, user, sizeof(wtmp.ut_user));
saved_path[sizeof(saved_path)] = '\0';
saved_user[sizeof(saved_user)] = '\0';
strlcpy(saved_path, path, sizeof(saved_path));
strlcpy(saved_user, user, sizeof(saved_user));
}
if (saved_jid == 0) {
saved_jid = jid;