=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/Attic/username.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/top/Attic/username.c 1997/08/22 07:16:31 1.2 +++ src/usr.bin/top/Attic/username.c 2001/07/27 17:04:06 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: username.c,v 1.2 1997/08/22 07:16:31 downsj Exp $ */ +/* $OpenBSD: username.c,v 1.3 2001/07/27 17:04:06 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -132,7 +132,8 @@ /* empty or wrong slot -- fill it with new value */ hash_table[hashindex].uid = uid; - (void) strncpy(hash_table[hashindex].name, name, 8); + (void) strlcpy(hash_table[hashindex].name, name, + sizeof(hash_table[hashindex].name)); return(hashindex); }