Subject: bin/28744: "crontab -l" dumps core if cron tab doesn't begin with three comments
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <eravin@panix.com>
List: netbsd-bugs
Date: 12/22/2004 00:15:00
>Number:         28744
>Category:       bin
>Synopsis:       "crontab -l" dumps core if cron tab doesn't begin with three comments
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 22 00:15:00 +0000 2004
>Originator:     Ed Ravin
>Release:        2.0
>Organization:
PANIX
>Environment:
NetBSD polyhedra.nyc.access.net 2.0 NetBSD 2.0 (PANIX-NETSERVER) #0: Thu Dec 16
15:20:23 EST 2004  root@trinity.nyc.access.net:/devel/netbsd/2.0/src/sys/arch/i386/compile/PANIX-NETSERVER i386
>Description:
when a /var/cron/tabs entry does not begin with three comment lines,
"crontab -l" segfaults.

"crontab -e" appears unaffected.
>How-To-Repeat:
# pwd
/var/cron/tabs
# echo '* * * * 5 fnordling' > uucp
# crontab -l -u uucp
Segmentation fault (core dumped)
# printf '#\n#\n#\n* * * * 5 fnordling\n' > uucp
# crontab -l -u uucp
* * * * 5 fnordling

>Fix: