*** usr.sbin/cron/cron/database.c 1994/08/27 13:43:03 1.1.1.1 --- usr.sbin/cron/cron/database.c 1996/09/10 03:38:20 1.3 *************** *** 112,119 **** if (dp->d_name[0] == '.') continue; ! (void) strcpy(fname, dp->d_name); ! sprintf(tabname, CRON_TAB(fname)); process_crontab(fname, fname, tabname, &statbuf, &new_db, old_db); --- 112,119 ---- if (dp->d_name[0] == '.') continue; ! (void)snprintf(fname, sizeof fname, "%s", dp->d_name); ! (void)snprintf(tabname, sizeof tabname, CRON_TAB(fname)); process_crontab(fname, fname, tabname, &statbuf, &new_db, old_db); *** usr.sbin/cron/crontab/crontab.c 1996/04/09 21:23:11 1.3.4.1 --- usr.sbin/cron/crontab/crontab.c 1996/08/05 00:50:02 1.6 *************** *** 167,173 **** ProgramName, optarg); exit(ERROR_EXIT); } ! (void) strcpy(User, optarg); break; case 'l': if (Option != opt_unknown) --- 165,171 ---- ProgramName, optarg); exit(ERROR_EXIT); } ! (void) snprintf(User, sizeof(user), "%s", optarg); break; case 'l': if (Option != opt_unknown) *************** *** 198,204 **** } else { if (argv[optind] != NULL) { Option = opt_replace; ! (void) strcpy (Filename, argv[optind]); } else { usage("file name must be specified for replace"); } --- 196,203 ---- } else { if (argv[optind] != NULL) { Option = opt_replace; ! (void) snprintf(Filename, sizeof(Filename), "%s", ! argv[optind]); } else { usage("file name must be specified for replace"); } *************** *** 480,486 **** ProgramName, Filename); goto done; default: ! fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n"); goto fatal; } remove: --- 479,486 ---- ProgramName, Filename); goto done; default: ! fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n", ! ProgramName); goto fatal; } remove: --- usr.sbin/cron/lib/env.c 1994/08/27 13:43:02 1.1.1.1 +++ usr.sbin/cron/lib/env.c 1996/12/16 18:11:57 @@ -115,7 +115,7 @@ { long filepos; int fileline; - char name[MAX_TEMPSTR], val[MAX_ENVSTR]; + char name[MAX_ENVSTR], val[MAX_ENVSTR]; int fields; filepos = ftell(f); --- usr.sbin/ppp/chat.c 1996/06/10 09:41:45 1.4.4.2 +++ usr.sbin/ppp/chat.c 1996/12/15 20:40:26 @@ -315,7 +315,7 @@ } cp--; } - sprintf(tmp, "%s %s", command, cp); + snprintf(tmp, sizeof tmp, "%s %s", command, cp); (void) MakeArgs(tmp, &vector); pipe(fids); --- usr.sbin/ppp/systems.c 1995/05/30 03:50:58 1.5 +++ usr.sbin/ppp/systems.c 1996/12/15 20:40:26 @@ -75,12 +75,12 @@ cp = getenv("HOME"); if (cp) { SetUserId(); - sprintf(line, "%s/.%s", cp, file); + snprintf(line, sizeof line, "%s/.%s", cp, file); fp = fopen(line, "r"); } if (fp == NULL) { SetPppId(); - sprintf(line, "%s/%s",_PATH_PPP, file); + snprintf(line, sizeof line, "%s/%s", _PATH_PPP, file); fp = fopen(line, "r"); } if (fp == NULL) { @@ -115,12 +115,12 @@ cp = getenv("HOME"); if (cp) { SetUserId(); - sprintf(line, "%s/.%s", cp, file); + snprintf(line, sizeof line, "%s/.%s", cp, file); fp = fopen(line, "r"); } if (fp == NULL) { SetPppId(); /* fix from pdp@ark.jr3uom.iijnet.or.jp */ - sprintf(line, "%s/%s",_PATH_PPP, file); + snprintf(line, sizeof line, "%s/%s", _PATH_PPP, file); fp = fopen(line, "r"); } if (fp == NULL) {