misc/170930: calendar(1) core dumps with minor input format deviations

Daniel Tso dantso at hotmail.com
Thu Aug 23 17:50:07 UTC 2012

>Number:         170930
>Category:       misc
>Synopsis:       calendar(1) core dumps with minor input format deviations
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 23 17:50:06 UTC 2012
>Originator:     Daniel Tso
>Release:        8.3
SUNY Upstate Medical University
FreeBSD tsolab.org 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:47:23 UTC 2
012     root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
Calendar(1) takes as input a file "calendar" in the current directory, of the form:

01/23     Event text

meaning the date, 01 (January), day of month (23rd).

If instead one puts extraneous text in the date field, calendar core dumps, e.g.

01/23/2012 Event text for the year 2012

Previous versions of calendar(1) did not have this behavior (I don't know the exact version of the change, but definitely calendar(1) from FreeBSD 5.1 did not have this problem -- it just ignores text after the day subfield.
$ cat > calendar
8/23     hello there
$ calendar
Aug 23  hello there
$ cat > calendar
8/23/2012  hello there core file
$ calendar
Segmentation fault (core dumped)



More information about the freebsd-bugs mailing list