=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/error/Attic/touch.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/error/Attic/touch.c 1998/07/10 14:09:56 1.6 --- src/usr.bin/error/Attic/touch.c 1999/12/04 00:09:22 1.7 *************** *** 1,4 **** ! /* $OpenBSD: touch.c,v 1.6 1998/07/10 14:09:56 mickey Exp $ */ /* $NetBSD: touch.c,v 1.3 1995/09/02 06:15:54 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: touch.c,v 1.7 1999/12/04 00:09:22 deraadt Exp $ */ /* $NetBSD: touch.c,v 1.3 1995/09/02 06:15:54 jtc Exp $ */ /* *************** *** 38,47 **** #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: touch.c,v 1.6 1998/07/10 14:09:56 mickey Exp $"; #endif /* not lint */ ! #include #include #include #include --- 38,47 ---- #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: touch.c,v 1.7 1999/12/04 00:09:22 deraadt Exp $"; #endif /* not lint */ ! #include #include #include #include *************** *** 520,526 **** FILE *o_touchedfile; /* the old file */ FILE *n_touchedfile; /* the new file */ char *o_name; ! char n_name[64]; int o_lineno; int n_lineno; boolean tempfileopen = FALSE; --- 520,526 ---- FILE *o_touchedfile; /* the old file */ FILE *n_touchedfile; /* the new file */ char *o_name; ! char n_name[MAXPATHLEN]; int o_lineno; int n_lineno; boolean tempfileopen = FALSE; *************** *** 538,544 **** warn("Can't open file \"%s\" to touch (read)", name); return(TRUE); } ! strcpy(n_name, _PATH_TMPFILE); if ((fd = mkstemp(n_name)) == -1 || (n_touchedfile = fdopen(fd, "w")) == NULL) { if (fd != -1) --- 538,544 ---- warn("Can't open file \"%s\" to touch (read)", name); return(TRUE); } ! strlcpy(n_name, _PATH_TMPFILE, sizeof(n_name)); if ((fd = mkstemp(n_name)) == -1 || (n_touchedfile = fdopen(fd, "w")) == NULL) { if (fd != -1)