From kenson@sentor.se  Sat Jan 12 06:42:20 2002
Return-Path: <kenson@sentor.se>
Received: from deliverator.sentor.se (deliverator.sentor.se [212.112.177.100])
	by hub.freebsd.org (Postfix) with ESMTP id 8114037B41C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 12 Jan 2002 06:42:19 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
	by viruswall.sentor.se (Postfix) with ESMTP id 6DCF335492A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 12 Jan 2002 15:40:57 +0100 (CET)
Received: by deliverator.sentor.se (Postfix, from userid 1001)
	id 6D3C635492B; Sat, 12 Jan 2002 15:40:56 +0100 (CET)
Message-Id: <20020112144056.6D3C635492B@deliverator.sentor.se>
Date: Sat, 12 Jan 2002 15:40:56 +0100 (CET)
From: Kenny Jansson <kenson@sentor.se>
Reply-To: Kenny Jansson <kenson@sentor.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: crontab segfaults when new entry contains a 0 i the monthfield	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33812
>Category:       bin
>Synopsis:       crontab segfaults when new entry contains a 0 i the monthfield
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 12 06:50:00 PST 2002
>Closed-Date:    Sat Jan 12 09:23:57 PST 2002
>Last-Modified:  Sat Jan 12 09:25:25 PST 2002
>Originator:     Kenny Jansson
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Sentor AB
>Environment:
System: FreeBSD xx.xx.xx 4.3-STABLE FreeBSD 4.3-STABLE #1: Tue Jul 17 11:03:52 CEST 2001 

>Description:

crontab segfaults when you try to add a new entry containing a '0' in the
monthfield. Here's a stacktrace from the dead process:

#0  0x804b9e9 in env_free ()
#1  0x804a8c4 in free_entry ()
#2  0x804b537 in load_entry ()
#3  0x804a6ca in replace_cmd () at /usr/src/usr.sbin/cron/crontab/crontab.c:551
#4  0x804a349 in edit_cmd () at /usr/src/usr.sbin/cron/crontab/crontab.c:454
#5  0x80497ad in main (argc=2, argv=0xbfbff7d8)
    at /usr/src/usr.sbin/cron/crontab/crontab.c:117
#6  0x804960d in _start ()


>How-To-Repeat:

crontab -e
and add a line like so:

1 1 1 0 1 touch /tmp/blah

crontab will segfault and the new entry will not be added to the users crontab

>Fix:

	
>Release-Note:
>Audit-Trail:

From: Maxim Konovalov <maxim@macomnet.ru>
To: Kenny Jansson <kenson@sentor.se>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/33812: crontab segfaults when new entry contains a 0 i the
 monthfield 
Date: Sat, 12 Jan 2002 18:41:30 +0300 (MSK)

 Seems already fixed in src/usr.sbin/cron/lib/entry.c 1.13 in -current
 and -stable:
 
 http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/cron/lib/entry.c?rev=1.13&content-type=text/x-cvsweb-markup
 
 -- 
 Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
 phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
 
 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sat Jan 12 09:23:57 PST 2002 
State-Changed-Why:  
Seems to be fixed in both -current and -stable (atleast I can't 
reproduce it on either and Maxim Konovalov reckons it 
was fixed in revision 1.13 of lib/entry.c and then merged 
to -stable). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33812 
>Unformatted:
