=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/quota/quota.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/quota/quota.c 1997/01/17 07:13:08 1.9 --- src/usr.bin/quota/quota.c 1998/07/10 08:17:39 1.10 *************** *** 1,4 **** ! /* $OpenBSD: quota.c,v 1.9 1997/01/17 07:13:08 millert Exp $ */ /* * Copyright (c) 1980, 1990, 1993 --- 1,4 ---- ! /* $OpenBSD: quota.c,v 1.10 1998/07/10 08:17:39 deraadt Exp $ */ /* * Copyright (c) 1980, 1990, 1993 *************** *** 44,50 **** #ifndef lint /*static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: quota.c,v 1.9 1997/01/17 07:13:08 millert Exp $"; #endif /* not lint */ /* --- 44,50 ---- #ifndef lint /*static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: quota.c,v 1.10 1998/07/10 08:17:39 deraadt Exp $"; #endif /* not lint */ /* *************** *** 411,424 **** minutes = (seconds + 30) / 60; hours = (minutes + 30) / 60; if (hours >= 36) { ! sprintf(buf, "%ddays", (hours + 12) / 24); return (buf); } if (minutes >= 60) { ! sprintf(buf, "%2d:%d", minutes / 60, minutes % 60); return (buf); } ! sprintf(buf, "%2d", minutes); return (buf); } --- 411,424 ---- minutes = (seconds + 30) / 60; hours = (minutes + 30) / 60; if (hours >= 36) { ! snprintf(buf, sizeof buf, "%ddays", (hours + 12) / 24); return (buf); } if (minutes >= 60) { ! snprintf(buf, sizeof buf, "%2d:%d", minutes / 60, minutes % 60); return (buf); } ! snprintf(buf, sizeof buf, "%2d", minutes); return (buf); } *************** *** 471,477 **** continue; } else continue; ! strcpy(qup->fsname, fst[i].f_mntonname); if (quphead == NULL) quphead = qup; else --- 471,478 ---- continue; } else continue; ! strncpy(qup->fsname, fst[i].f_mntonname, sizeof qup->fsname-1); ! qup->fsname[sizeof qup->fsname-1] = '\0'; if (quphead == NULL) quphead = qup; else