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