From owner-freebsd-stable Sun Dec 15 11:00:09 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id LAA21808 for stable-outgoing; Sun, 15 Dec 1996 11:00:09 -0800 (PST) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id LAA21803 for ; Sun, 15 Dec 1996 11:00:06 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.7.5/8.7.3) with UUCP id MAA20064 for stable@freebsd.org; Sun, 15 Dec 1996 12:00:02 -0700 (MST) Received: from localhost (marcs@localhost) by alive.ampr.ab.ca (8.7.5/8.7.3) with SMTP id LAA01929 for ; Sun, 15 Dec 1996 11:59:14 -0700 (MST) Date: Sun, 15 Dec 1996 11:59:13 -0700 (MST) From: Marc Slemko X-Sender: marcs@alive.ampr.ab.ca To: stable@freebsd.org Subject: someone please commit this fix for crontab hole Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Can someone please commit this (well, I don't care what fix it is but this is just the fix from -current) to -stable. Tested, works. Index: crontab.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/cron/crontab/crontab.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** crontab.c 1996/04/09 20:28:16 1.4 --- crontab.c 1996/08/05 00:31:27 1.5 *************** *** 167,173 **** ProgramName, optarg); exit(ERROR_EXIT); } ! (void) strcpy(User, optarg); break; case 'l': if (Option != opt_unknown) --- 167,173 ---- 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"); } --- 198,205 ---- } 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: --- 481,488 ---- ProgramName, Filename); goto done; default: ! fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n", ! ProgramName); goto fatal; } remove: