From owner-freebsd-bugs Sun Jul 22 22:30: 5 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 18B7137B407 for ; Sun, 22 Jul 2001 22:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6N5U1L19239; Sun, 22 Jul 2001 22:30:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A553D37B406 for ; Sun, 22 Jul 2001 22:29:53 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6N5TrJ19204; Sun, 22 Jul 2001 22:29:53 -0700 (PDT) (envelope-from nobody) Message-Id: <200107230529.f6N5TrJ19204@freefall.freebsd.org> Date: Sun, 22 Jul 2001 22:29:53 -0700 (PDT) From: Ming Zhang To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/29156: crontab core dumps when install a cron table from a file which contains an empty line, ie, only contains \n or \r\n Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29156 >Category: bin >Synopsis: crontab core dumps when install a cron table from a file which contains an empty line, ie, only contains \n or \r\n >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 22 22:30:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Ming Zhang >Release: 3.4-stable >Organization: >Environment: FreeBSD shell.unixbox.com 4.3-STABLE FreeBSD 4.3-STABLE #0: Sun Jul 22 20:07:37 PDT 2001 ming@shell.unixbox.com:/usr/src/sys/compile/unixbox i386 >Description: crontab calls load_entry() load the file. When an error is detected in a line of the file, for example, an empty line (\n or \r\n), load_entry() jumps to eof: which then calls free_entry(), in free_entry(), env_free(e->envp) is called, however at this point, e->envp is NULL, thus causes crontab to coredump. >How-To-Repeat: create a file with an empty line and feed it to crontab >Fix: entry.c: change env_free (e->envp) to if (e->envp) env_free (e->envp); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message