=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/finger/util.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- src/usr.bin/finger/util.c 2014/10/17 08:03:04 1.25 +++ src/usr.bin/finger/util.c 2014/10/17 20:16:13 1.26 @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.25 2014/10/17 08:03:04 doug Exp $ */ +/* $OpenBSD: util.c,v 1.26 2014/10/17 20:16:13 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -115,7 +115,7 @@ pn->dir = estrdup(pw->pw_dir); pn->shell = estrdup(pw->pw_shell); - (void)strncpy(bp = tbuf, pw->pw_gecos, sizeof(tbuf)); + (void)strlcpy(bp = tbuf, pw->pw_gecos, sizeof(tbuf)); /* ampersands get replaced by the login name */ if (!(p = strsep(&bp, ","))) @@ -148,7 +148,7 @@ char *p, *t; char name[1024]; - (void)strncpy(p = tbuf, pw->pw_gecos, sizeof(tbuf)); + (void)strlcpy(p = tbuf, pw->pw_gecos, sizeof(tbuf)); /* ampersands get replaced by the login name */ if (!(p = strtok(p, ",")))